Thanks for tracking this bug down. I introduced the bug in 2006 when I noticed
that the expression '(size_t) (mbclen + 2) > 2' can have undefined behavior on
(admittedly unlikely) platforms where size_t is one bit narrower than int. (Such
platforms have existed in the past - I even worked for a
Hi,
On 25/08/18 01:46 AM, Paul Eggert wrote:
Please try the attached gnulib patch, which should fix the problem in a
portable way. Modern GCC optimizes the clear code just as well as the
confusing code, so we might as well write it clearly.
Thanks for the quick fix and explanation. The patch
Assaf Gordon wrote:
Thanks for the quick fix and explanation. The patch works for me.
Thanks for checking. I installed the fix into glibc and propagated it into
Gnulib.