]> git.eshelyaron.com Git - emacs.git/commitdiff
* print.c: Integer overflow fix.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Sep 2011 17:25:23 +0000 (10:25 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Sep 2011 17:25:23 +0000 (10:25 -0700)
(print_object): Use ptrdiff_t, not int, for index that can
exceed INT_MAX.

src/ChangeLog
src/print.c

index 9c5ca280eba2d3f01c6b5094d5762b41aff3dd8e..cbd8cd2c219340b6a02c174da0640aa779aa0799 100644 (file)
@@ -1,5 +1,9 @@
 2011-09-04  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * print.c: Integer overflow fix.
+       (print_object): Use ptrdiff_t, not int, for index that can
+       exceed INT_MAX.
+
        * indent.c: Integer overflow fixes.
        (position_indentation): Now takes ptrdiff_t, not int.
        (Fvertical_motion): Don't wrap around LINES values that don't fit
index 35f898608433e81454da77a96c8818ca5b1faece..913a14b3e4289c121c60711cc42527f9a9a6752b 100644 (file)
@@ -1697,7 +1697,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
        }
       else if (BOOL_VECTOR_P (obj))
        {
-         register int i;
+         ptrdiff_t i;
          register unsigned char c;
          struct gcpro gcpro1;
          EMACS_INT size_in_chars