From: Paul Eggert Date: Mon, 29 Aug 2011 19:09:16 +0000 (-0700) Subject: * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf, X-Git-Tag: emacs-pretest-24.0.90~104^2~153^2~1^2~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a66ff6d8b7f1ba4a8ef4d52f7d66b7804ba97091;p=emacs.git * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf, in case result does not fit in int. --- diff --git a/src/ChangeLog b/src/ChangeLog index b69830b23a0..362109acbe6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -74,6 +74,9 @@ (Fexecute_kbd_macro): Don't assume repeat count fits in int. * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int. + * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf, + in case result does not fit in int. + 2011-08-26 Paul Eggert 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) strcpy (old_title, t); } size_title = xmalloc (strlen (old_title) + 40); - sprintf (size_title, "%s — (%d x %d)", old_title, cols, rows); + esprintf (size_title, "%s — (%d x %d)", old_title, cols, rows); [window setTitle: [NSString stringWithUTF8String: size_title]]; [window display]; xfree (size_title);