diff options
| author | Paul Eggert | 2011-05-15 10:17:44 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-05-15 10:17:44 -0700 |
| commit | 067a69a2d38db30190997dc48dbf82988ffa3583 (patch) | |
| tree | f8ce54ac9c65d32d1349cb449485ed0ba1833d57 /src/menu.c | |
| parent | 5e9e35cd1dd6e4fb47c6720991581508b89f87f7 (diff) | |
| parent | 9fbd68410f1680b5b9bc2d56c239183ea13c7d58 (diff) | |
| download | emacs-067a69a2d38db30190997dc48dbf82988ffa3583.tar.gz emacs-067a69a2d38db30190997dc48dbf82988ffa3583.zip | |
Merge: user-interface timestamps and other int overflow patches.
Diffstat (limited to 'src/menu.c')
| -rw-r--r-- | src/menu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/menu.c b/src/menu.c index 7a3edcb6f4f..d2486439fd0 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -176,6 +176,8 @@ save_menu_items (void) | |||
| 176 | static void | 176 | static void |
| 177 | grow_menu_items (void) | 177 | grow_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 | } |
| @@ -1145,13 +1147,13 @@ no quit occurs and `x-popup-menu' returns nil. */) | |||
| 1145 | #else /* not HAVE_X_WINDOWS */ | 1147 | #else /* not HAVE_X_WINDOWS */ |
| 1146 | Lisp_Object bar_window; | 1148 | Lisp_Object bar_window; |
| 1147 | enum scroll_bar_part part; | 1149 | enum scroll_bar_part part; |
| 1148 | unsigned long time; | 1150 | Time time; |
| 1149 | void (*mouse_position_hook) (struct frame **, int, | 1151 | void (*mouse_position_hook) (struct frame **, int, |
| 1150 | Lisp_Object *, | 1152 | Lisp_Object *, |
| 1151 | enum scroll_bar_part *, | 1153 | enum scroll_bar_part *, |
| 1152 | Lisp_Object *, | 1154 | Lisp_Object *, |
| 1153 | Lisp_Object *, | 1155 | Lisp_Object *, |
| 1154 | unsigned long *) = | 1156 | Time *) = |
| 1155 | FRAME_TERMINAL (new_f)->mouse_position_hook; | 1157 | FRAME_TERMINAL (new_f)->mouse_position_hook; |
| 1156 | 1158 | ||
| 1157 | if (mouse_position_hook) | 1159 | if (mouse_position_hook) |