Commit 80f2e268 authored by Paul Eggert's avatar Paul Eggert
Browse files

* term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger

to avoid potential buffer overrun.
parent 31c286f7
......@@ -88,6 +88,9 @@
* process.c (make_process): Use printmax_t, not int, to format
process-name gensyms.
* term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
to avoid potential buffer overrun.
2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
Integer and memory overflow issues (Bug#9196).
......
......@@ -1887,7 +1887,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
{
int face_id;
int len;
char buf[9];
char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)];
char const *str = " ";
/* Get a face ID for the glyph by utilizing a cache (the same way as
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment