From: Paul Eggert Date: Sun, 27 Mar 2011 17:14:11 +0000 (-0700) Subject: * keyboard.c (parse_modifiers_uncached, parse_modifiers): X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~460^2~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba0165e1f14c55aaba73de35d75a9acea721c825;p=emacs.git * keyboard.c (parse_modifiers_uncached, parse_modifiers): Don't assume string length fits in int. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6cb8ad8000d..bfee23b16d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-27 Paul Eggert + * keyboard.c (parse_modifiers_uncached, parse_modifiers): + Don't assume string length fits in int. + * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA instead of alloca (Bug#8344). diff --git a/src/keyboard.c b/src/keyboard.c index 28d65766664..e29c7e9bc5c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5959,10 +5959,10 @@ make_lispy_switch_frame (Lisp_Object frame) This doesn't use any caches. */ static int -parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end) +parse_modifiers_uncached (Lisp_Object symbol, EMACS_INT *modifier_end) { Lisp_Object name; - int i; + EMACS_INT i; int modifiers; CHECK_SYMBOL (symbol); @@ -5972,7 +5972,7 @@ parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end) for (i = 0; i+2 <= SBYTES (name); ) { - int this_mod_end = 0; + EMACS_INT this_mod_end = 0; int this_mod = 0; /* See if the name continues with a modifier word. @@ -6169,7 +6169,7 @@ parse_modifiers (Lisp_Object symbol) return elements; else { - int end; + EMACS_INT end; int modifiers = parse_modifiers_uncached (symbol, &end); Lisp_Object unmodified; Lisp_Object mask;