[Bug string/16004] memcpy/strcpy: detect memory overlap and crash when error is detected

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Wed Aug 24 18:41:00 GMT 2016


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.


More information about the Glibc-bugs mailing list