aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-08-29 12:09:16 -0700
committerPaul Eggert2011-08-29 12:09:16 -0700
commita66ff6d8b7f1ba4a8ef4d52f7d66b7804ba97091 (patch)
treef1249fee78c5321d59562387592d0dd3bb96ecbb /src
parent48e3079369b75be22bcc429bc77bc5e61843562d (diff)
downloademacs-a66ff6d8b7f1ba4a8ef4d52f7d66b7804ba97091.tar.gz
emacs-a66ff6d8b7f1ba4a8ef4d52f7d66b7804ba97091.zip
* nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
in case result does not fit in int.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/nsterm.m2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b69830b23a0..362109acbe6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -74,6 +74,9 @@
74 (Fexecute_kbd_macro): Don't assume repeat count fits in int. 74 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
75 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int. 75 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
76 76
77 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
78 in case result does not fit in int.
79
772011-08-26 Paul Eggert <eggert@cs.ucla.edu> 802011-08-26 Paul Eggert <eggert@cs.ucla.edu>
78 81
79 Integer and memory overflow issues (Bug#9196). 82 Integer and memory overflow issues (Bug#9196).
diff --git a/src/nsterm.m b/src/nsterm.m
index 4c9574c35ba..827404a2974 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5316,7 +5316,7 @@ ns_term_shutdown (int sig)
5316 strcpy (old_title, t); 5316 strcpy (old_title, t);
5317 } 5317 }
5318 size_title = xmalloc (strlen (old_title) + 40); 5318 size_title = xmalloc (strlen (old_title) + 40);
5319 sprintf (size_title, "%s — (%d x %d)", old_title, cols, rows); 5319 esprintf (size_title, "%s — (%d x %d)", old_title, cols, rows);
5320 [window setTitle: [NSString stringWithUTF8String: size_title]]; 5320 [window setTitle: [NSString stringWithUTF8String: size_title]];
5321 [window display]; 5321 [window display];
5322 xfree (size_title); 5322 xfree (size_title);