[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f3f67cf: Pacify GCC 7 with -Wformat-overflow
From: |
Ken Brown |
Subject: |
[Emacs-diffs] master f3f67cf: Pacify GCC 7 with -Wformat-overflow |
Date: |
Sat, 21 Jul 2018 12:19:30 -0400 (EDT) |
branch: master
commit f3f67cf0b9a6388d423e048a7aafad2eb531b5a5
Author: Ken Brown <address@hidden>
Commit: Ken Brown <address@hidden>
Pacify GCC 7 with -Wformat-overflow
* src/w32term.c (x_draw_glyphless_glyph_string_foreground):
Force sprintf to write at most 6 bytes, excluding the
terminating null byte.
---
src/w32term.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/w32term.c b/src/w32term.c
index ff0d2bf..0ae173a 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1476,7 +1476,7 @@ x_draw_glyphless_glyph_string_foreground (struct
glyph_string *s)
{
sprintf ((char *) buf, "%0*X",
glyph->u.glyphless.ch < 0x10000 ? 4 : 6,
- (unsigned int) glyph->u.glyphless.ch);
+ (unsigned int) glyph->u.glyphless.ch & 0xffffff);
str = buf;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f3f67cf: Pacify GCC 7 with -Wformat-overflow,
Ken Brown <=