Re: Undefined behavior in lib/canonicalize-lgpl.c

2020-09-10 Thread Paul Eggert
On 9/10/20 6:34 AM, Adhemerval Zanella wrote: I think the lib/canonicalize.c is also affected: Thanks for the heads-ups. I installed the attached patch to Gnulib, which fixes a related bug I noticed while in the neighborhood (I don't think glibc has this bug). This patch uses the expression

Re: Undefined behavior in lib/canonicalize-lgpl.c

2020-09-10 Thread Adhemerval Zanella
On 10/09/2020 05:32, Florian Weimer wrote: > We have received a report that the glibc realpath implementation > exhibits undefined behavior: > > > > In gnulib, the code is in lib/canonicalize-lgpl.c: > > 234 if (!ISSLASH (de

Undefined behavior in lib/canonicalize-lgpl.c

2020-09-10 Thread Florian Weimer
We have received a report that the glibc realpath implementation exhibits undefined behavior: In gnulib, the code is in lib/canonicalize-lgpl.c: 234 if (!ISSLASH (dest[-1])) 235 *dest++ = '/'; 236 23