summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-28 17:30:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-28 17:30:00 -0700
commit34db673b3978bd88aea081882a70bdcdf53028a7 (patch)
tree45687e0d92ee98047899b1602c345424889da749 /src/keyboard.h
parentddff315164d62859e0eb87e89de9f785b953a39a (diff)
downloademacs-34db673b3978bd88aea081882a70bdcdf53028a7.tar.gz
* keyboard.c: Integer and memory overflow fixes.
(read_char, menu_bar_items, tool_bar_items, read_char_x_menu_prompt) (read_char_minibuf_menu_width, read_char_minibuf_menu_prompt) (follow_key, read_key_sequence): Use ptrdiff_t, not int, to count maps. (read_char_minibuf_menu_prompt): Check for overflow in size calculations. Don't update size until allocation succeeds. Redo calculations to avoid overflow. * keyboard.h: Change prototypes to match the above.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
index 69c804c873d..d4339d0529b 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -440,7 +440,7 @@ struct input_event;
extern Lisp_Object parse_modifiers (Lisp_Object);
extern Lisp_Object reorder_modifiers (Lisp_Object);
-extern Lisp_Object read_char (int, int, Lisp_Object *, Lisp_Object,
+extern Lisp_Object read_char (int, ptrdiff_t, Lisp_Object *, Lisp_Object,
int *, EMACS_TIME *);
extern int parse_solitary_modifier (Lisp_Object symbol);