aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/menu.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 10b3ef2d6f2..913dcc05a10 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12011-05-12 Paul Eggert <eggert@cs.ucla.edu> 12011-05-12 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * menu.c (grow_menu_items): Check for int overflow.
4
3 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils. 5 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
4 6
52011-05-11 Paul Eggert <eggert@cs.ucla.edu> 72011-05-11 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/src/menu.c b/src/menu.c
index 7a3edcb6f4f..705100381d5 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -176,6 +176,8 @@ save_menu_items (void)
176static void 176static void
177grow_menu_items (void) 177grow_menu_items (void)
178{ 178{
179 if ((INT_MAX - MENU_ITEMS_PANE_LENGTH) / 2 < menu_items_allocated)
180 memory_full ();
179 menu_items_allocated *= 2; 181 menu_items_allocated *= 2;
180 menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); 182 menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
181} 183}