all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: 32230@debbugs.gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow
Date: Fri, 20 Jul 2018 18:02:07 -0400	[thread overview]
Message-ID: <2d9037f1-e52f-f3ca-7c53-e203ea6ae520@cornell.edu> (raw)

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






             reply	other threads:[~2018-07-20 22:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 22:02 Ken Brown [this message]
2018-07-21  6:53 ` bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d9037f1-e52f-f3ca-7c53-e203ea6ae520@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=32230@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.