[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Undefined behavior in lib/canonicalize-lgpl.c
From: |
Florian Weimer |
Subject: |
Undefined behavior in lib/canonicalize-lgpl.c |
Date: |
Thu, 10 Sep 2020 10:32:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
We have received a report that the glibc realpath implementation
exhibits undefined behavior:
<https://sourceware.org/bugzilla/show_bug.cgi?id=26592>
In gnulib, the code is in lib/canonicalize-lgpl.c:
234 if (!ISSLASH (dest[-1]))
235 *dest++ = '/';
236
237 if (dest + (end - start) >= rpath_limit)
238 {
239 ptrdiff_t dest_offset = dest - rpath;
240 char *new_rpath;
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
- Undefined behavior in lib/canonicalize-lgpl.c,
Florian Weimer <=