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: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 22 Aug 2016 15:34:07 +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
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot com
--- Comment #5 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
FWIW, overlapping memcpy()ies are very common, and not always a "real" bug.
E.g.
void *p = allocate_and_init (10);
...
void *q = realloc(p, 20); // q may or may not == p.
memcpy(q, p, 10);
I've seen examples of "not a real bug" where p!=q as well.
While in theory these all should be fixed, in practice end users may not be in
a position to do so (e.g. prebuilt 3rd party library where the 3rd party
doesn't exist anymore, or isn't willing or able to provide a fixed version).
--
You are receiving this mail because:
You are on the CC list for the bug.