[Bug c/83688] Please check if buffers may overlap when copying strings using sprintf
bugzilla@poradnik-webmastera.com
gcc-bugzilla@gcc.gnu.org
Thu Jan 4 20:27:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #5 from Daniel Fruzynski <bugzilla@poradnik-webmastera.com> ---
> There is nothing to indicate that the first call to memcpy() in comment #0
> overlaps so -Wrestrict doesn't warn for it.
I thought that fix for bug 83373 will somehow help here. gcc could guess that
memcpy will copy from 1 to 15 bytes, which may overlap destination. In fact
this could help in all cases here except last memcpy.
More information about the Gcc-bugs
mailing list