This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/77671] missing -Wformat-length warning on sprintf overflow with "%s"
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Sep 2016 01:52:42 +0000
- Subject: [Bug middle-end/77671] missing -Wformat-length warning on sprintf overflow with "%s"
- Auto-submitted: auto-generated
- References: <bug-77671-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77671
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Summary|missing -Wformat-length |missing -Wformat-length
|warning on overflow %s |warning on sprintf overflow
| |with "%s"
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
As the test case in comment #0 shows, GCC issues a -Wformat-length warning for
the call in function f but fails to do the same thing for the equivalent call
in function g.