From: Florian Weimer <fweimer@redhat.com>
To: bug-gnulib@gnu.org
Subject: Undefined behavior in lib/canonicalize-lgpl.c
Date: Thu, 10 Sep 2020 10:32:23 +0200 [thread overview]
Message-ID: <87eena6nhk.fsf@oldenburg2.str.redhat.com> (raw)
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
next reply other threads:[~2020-09-10 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 8:32 Florian Weimer [this message]
2020-09-10 13:34 ` Undefined behavior in lib/canonicalize-lgpl.c Adhemerval Zanella
2020-09-10 21:52 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eena6nhk.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).