From: Paul Eggert Date: Sun, 4 Sep 2011 17:25:23 +0000 (-0700) Subject: * print.c: Integer overflow fix. X-Git-Tag: emacs-pretest-24.0.90~104^2~153^2~2^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=29ebea3b123db665db1267880df65d0ec697aff3;p=emacs.git * print.c: Integer overflow fix. (print_object): Use ptrdiff_t, not int, for index that can exceed INT_MAX. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9c5ca280eba..cbd8cd2c219 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-09-04 Paul Eggert + * 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 diff --git a/src/print.c b/src/print.c index 35f89860843..913a14b3e42 100644 --- a/src/print.c +++ b/src/print.c @@ -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