]> git.eshelyaron.com Git - emacs.git/commitdiff
* keyboard.c (parse_modifiers_uncached, parse_modifiers):
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 27 Mar 2011 17:14:11 +0000 (10:14 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 27 Mar 2011 17:14:11 +0000 (10:14 -0700)
Don't assume string length fits in int.

src/ChangeLog
src/keyboard.c

index 6cb8ad8000d54eb549a1e03a8e98be67cc1d81a6..bfee23b16d0f1d1e3be8e46deeaef7a2289149e1 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-27  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * 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).
 
index 28d657666649e09386bb732750fffdf230ca34c7..e29c7e9bc5c0d1a3a2fc8250517e2c3d1306c73e 100644 (file)
@@ -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;