[Bug middle-end/83959] Missing buffer overflow warning on printf %s
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 25 22:24:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83959
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
I agree that it would be valuable to detect this class of bugs, including all
other such invalid uses of character arrays that aren't nul-terminated (e.g.,
strlen(a)), and perhaps even those that aren't initialized. I think the most
suitable pass to detect these bugs is tree-ssa-strlen. For the printf-family
of functions, integrating the gimple-ssa-sprintf pass would be a good approach.
(By integrating I don't necessarily mean at the source code level but rather
by having the strlen pass drive and call into the sprintf code).
This request is a duplicate of pr71501.
*** This bug has been marked as a duplicate of bug 71501 ***
More information about the Gcc-bugs
mailing list