unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow
@ 2018-07-20 22:02 Ken Brown
  2018-07-21  6:53 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Ken Brown @ 2018-07-20 22:02 UTC (permalink / raw)
  To: 32230; +Cc: Paul Eggert

The Cygwin-w32 build has turned up another GCC 7 warning:

../../master/src/w32term.c: In function ‘x_draw_glyph_string’:
../../master/src/w32term.c:1477:27: warning: ‘__builtin___sprintf_chk’ 
may write a terminating nul past the end of the destination 
[-Wformat-overflow=]
     sprintf ((char *) buf, "%0*X",
                            ^
../../master/src/w32term.c:1477:4: note: ‘__builtin___sprintf_chk’ 
output between 5 and 8 bytes into a destination of size 7
     sprintf ((char *) buf, "%0*X",
     ^
The method that Paul used in bug#32189 could be used here too, but I'm
not sure it's worth the trouble.  My inclination is to just increase the
buffer size from 7 to 8.

Ken






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-21 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20 22:02 bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow Ken Brown
2018-07-21  6:53 ` Eli Zaretskii
2018-07-21  7:26   ` Eli Zaretskii
2018-07-21 12:42     ` Ken Brown
2018-07-21 12:47       ` Eli Zaretskii
2018-07-21 16:26         ` Ken Brown
2018-07-21 16:40           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).