bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42656: term.c:1405:25: warning: ‘%d’ directive writing between 2 and


From: Jeffrey Walton
Subject: bug#42656: term.c:1405:25: warning: ‘%d’ directive writing between 2 and 10 bytes into a region of size 3
Date: Sat, 1 Aug 2020 15:27:48 -0400

I think this can be cleared by clamping the argument.

term.c: In function ‘term_get_fkeys_1’:
term.c:1405:25: warning: ‘%d’ directive writing between 2 and 10 bytes
into a region of size 3 [-Wformat-overflow=]
        sprintf (fkey, "f%d", i);
                         ^~
term.c:1405:23: note: directive argument in the range [11, 2147483646]
        sprintf (fkey, "f%d", i);
                       ^~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../lib/stdio.h:43,
                 from termchar.h:22,
                 from term.c:31:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note:
‘__builtin___sprintf_chk’ output between 4 and 12 bytes into a
destination of size 4
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]