This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/77671] missing -Wformat-length warning on sprintf overflow with "%s"


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]