From: Paul Eggert Date: Sat, 18 Jun 2011 16:02:03 +0000 (-0700) Subject: * fns.c: Don't assume string byte-length fits in 'int'. X-Git-Tag: emacs-pretest-24.0.90~104^2~473^2~56 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=311d5d7cc63a9f2d4823066f82faeb4fb6203710;p=emacs.git * fns.c: Don't assume string byte-length fits in 'int'. --- diff --git a/src/ChangeLog b/src/ChangeLog index 75b9327247c..ee582c4e4a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'. Use much-faster test for byte-length change. + Don't assume string byte-length fits in 'int'. * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication. diff --git a/src/fns.c b/src/fns.c index c308e06101f..51b753b3134 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2169,7 +2169,7 @@ ARRAY is a vector, string, char-table, or bool-vector. */) unsigned char str[MAX_MULTIBYTE_LENGTH]; int len = CHAR_STRING (charval, str); EMACS_INT size_byte = SBYTES (array); - int i; + EMACS_INT i; if (INT_MULTIPLY_OVERFLOW (SCHARS (array), len) || SCHARS (array) * len != size_byte)