[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 18:43:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #3 from Daniel Fruzynski <bugzilla@poradnik-webmastera.com> ---
Looks that something is not working properly. I have pasted output from
compilation of function in 1st post, and -Wrestrict complained only about last
memcpy call. Please take a look on this.
BTW, string concatenation using sprintf causes -Wformat-overflow warning, so
some protection against this is present. However this message does not say
anything that this is undefined behavior per C standard.
More information about the Gcc-bugs
mailing list