aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-08-29 12:46:15 -0700
committerPaul Eggert2011-08-29 12:46:15 -0700
commit31c286f79d43a002f441b90dc0176014ba0fa8e7 (patch)
tree3449484c337563437bf2f4171d6e65bf3f3e9ff0
parentaca216ff01bab0741e718036a3c6d887994904c6 (diff)
downloademacs-31c286f79d43a002f441b90dc0176014ba0fa8e7.tar.gz
emacs-31c286f79d43a002f441b90dc0176014ba0fa8e7.zip
* process.c (make_process): Use printmax_t, not int, to format
process-name gensyms.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/process.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d1d11df1900..b1c29363da0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -85,6 +85,9 @@
85 index. Don't assume hash table size fits in 'long', or that 85 index. Don't assume hash table size fits in 'long', or that
86 vectorlike size fits in 'unsigned long'. 86 vectorlike size fits in 'unsigned long'.
87 87
88 * process.c (make_process): Use printmax_t, not int, to format
89 process-name gensyms.
90
882011-08-26 Paul Eggert <eggert@cs.ucla.edu> 912011-08-26 Paul Eggert <eggert@cs.ucla.edu>
89 92
90 Integer and memory overflow issues (Bug#9196). 93 Integer and memory overflow issues (Bug#9196).
diff --git a/src/process.c b/src/process.c
index a8088322147..058ad5f871f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -616,8 +616,8 @@ make_process (Lisp_Object name)
616{ 616{
617 register Lisp_Object val, tem, name1; 617 register Lisp_Object val, tem, name1;
618 register struct Lisp_Process *p; 618 register struct Lisp_Process *p;
619 char suffix[10]; 619 char suffix[sizeof "<>" + INT_STRLEN_BOUND (printmax_t)];
620 register int i; 620 printmax_t i;
621 621
622 p = allocate_process (); 622 p = allocate_process ();
623 623
@@ -651,7 +651,7 @@ make_process (Lisp_Object name)
651 { 651 {
652 tem = Fget_process (name1); 652 tem = Fget_process (name1);
653 if (NILP (tem)) break; 653 if (NILP (tem)) break;
654 sprintf (suffix, "<%d>", i); 654 sprintf (suffix, "<%"pMd">", i);
655 name1 = concat2 (name, build_string (suffix)); 655 name1 = concat2 (name, build_string (suffix));
656 } 656 }
657 name = name1; 657 name = name1;