projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff105b3
)
Fix core dump from (format "%#08x" n) patch
author
Paul Eggert
<eggert@cs.ucla.edu>
Fri, 8 Dec 2017 21:30:06 +0000
(13:30 -0800)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Fri, 8 Dec 2017 21:30:25 +0000
(13:30 -0800)
Problem reported by Glenn Morris (Bug#29609#13).
* src/editfns.c (styled_format): Null-terminate output,
as later code now expects this.
src/editfns.c
patch
|
blob
|
history
diff --git
a/src/editfns.c
b/src/editfns.c
index ebf6518994b93880bc13727e8db4c58e9c496ed8..084d92346f58e862008cf73db944e31ab91d105e 100644
(file)
--- a/
src/editfns.c
+++ b/
src/editfns.c
@@
-4623,6
+4623,7
@@
styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
/* Don't use sprintf here, as it might mishandle prec. */
sprintf_buf[0] = XINT (arg);
sprintf_bytes = prec != 0;
+ sprintf_buf[sprintf_bytes] = '\0';
}
else if (conversion == 'd' || conversion == 'i')
{