From: Paul Eggert Date: Sat, 9 Apr 2011 22:39:14 +0000 (-0700) Subject: * editfns.c (Fformat): Likewise. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~356^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3ab1c7ce324bc733e0f45d3f7301eb833736b956;p=emacs.git * editfns.c (Fformat): Likewise. --- diff --git a/src/ChangeLog b/src/ChangeLog index be3925c088e..9e2538c5851 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ and to avoid potential problems with integer overflow. * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise. * casetab.c (set_identity, shuffle): Likewise. + * editfns.c (Fformat): Likewise. * xmenu.c (set_frame_menubar): Allocate smaller local vectors. This also lets GCC 4.6.0 generate slightly better loop code. diff --git a/src/editfns.c b/src/editfns.c index cd424f277bf..e754a074ba8 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3674,7 +3674,7 @@ usage: (format STRING &rest OBJECTS) */) if (!info) info = (struct info *) alloca (nbytes); memset (info, 0, nbytes); - for (i = 0; i <= nargs; i++) + for (i = 0; i < nargs + 1; i++) info[i].start = -1; if (!discarded) SAFE_ALLOCA (discarded, char *, SBYTES (args[0]));