This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug string/16004] memcpy/strcpy: detect memory overlap and crash when error is detected
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 24 Aug 2016 18:41:01 +0000
- Subject: [Bug string/16004] memcpy/strcpy: detect memory overlap and crash when error is detected
- Auto-submitted: auto-generated
- References: <bug-16004-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16004
--- Comment #9 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Paul Pluzhnikov from comment #8)
> (In reply to Sergei Trofimovich from comment #7)
>
> > This one looks like a scary use-after-free.
>
> You are right. Bad example. Most of the real ones involve swap() with itself.
And GCC generates such memcpy calls, even for valid C code:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667#c13
--
You are receiving this mail because:
You are on the CC list for the bug.