This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]