From 3ab1c7ce324bc733e0f45d3f7301eb833736b956 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 9 Apr 2011 15:39:14 -0700 Subject: [PATCH] * editfns.c (Fformat): Likewise. --- src/ChangeLog | 1 + src/editfns.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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])); -- 2.39.2