Comment 125 for bug 727064

Revision history for this message
In , jengelh (jengelh-redhat-bugs) wrote :

(In reply to comment #40)
>
> You can call it "crap software" all you like, but the thing is, if memcpy
> doesn't warn about overlaps, there's no test coverage

So let's just add an abort() call to memcpy if it is detected that the areas overlap. Doing so is within the C specification and will surely get everybody their test coverage. Performance degradation, I hear? Limit it to -D_FORTIFY_SOURCE then maybe.