1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 11:33:09 -08:00

* process.c (make_process): Use printmax_t, not int, to format

process-name gensyms.
This commit is contained in:
Paul Eggert 2011-08-29 12:46:15 -07:00
parent aca216ff01
commit 31c286f79d
2 changed files with 6 additions and 3 deletions

View file

@ -85,6 +85,9 @@
index. Don't assume hash table size fits in 'long', or that
vectorlike size fits in 'unsigned long'.
* process.c (make_process): Use printmax_t, not int, to format
process-name gensyms.
2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
Integer and memory overflow issues (Bug#9196).

View file

@ -616,8 +616,8 @@ make_process (Lisp_Object name)
{
register Lisp_Object val, tem, name1;
register struct Lisp_Process *p;
char suffix[10];
register int i;
char suffix[sizeof "<>" + INT_STRLEN_BOUND (printmax_t)];
printmax_t i;
p = allocate_process ();
@ -651,7 +651,7 @@ make_process (Lisp_Object name)
{
tem = Fget_process (name1);
if (NILP (tem)) break;
sprintf (suffix, "<%d>", i);
sprintf (suffix, "<%"pMd">", i);
name1 = concat2 (name, build_string (suffix));
}
name = name1;