From: Paul Eggert Date: Tue, 14 Jun 2011 22:41:38 +0000 (-0700) Subject: * fns.c (Fcopy_sequence): Don't assume vector length fits in int. X-Git-Tag: emacs-pretest-24.0.90~104^2~548^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de41a8106952ceb1d14dd25564fa5eba1ced9110;p=emacs.git * fns.c (Fcopy_sequence): Don't assume vector length fits in int. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4326bad03fc..5cb9384f6fb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,7 @@ (Fsafe_length): Return a float if the value is not representable as a fixnum. This shouldn't happen except in contrived situations. (Fnthcdr, Fsort): Don't assume list length fits in int. + (Fcopy_sequence): Don't assume vector length fits in int. * alloc.c: Check that resized vectors' lengths fit in fixnums. (header_size, word_size): New constants. diff --git a/src/fns.c b/src/fns.c index 987d5a6564d..69b95cba09c 100644 --- a/src/fns.c +++ b/src/fns.c @@ -436,7 +436,7 @@ with the original. */) if (BOOL_VECTOR_P (arg)) { Lisp_Object val; - int size_in_chars + ptrdiff_t size_in_chars = ((XBOOL_VECTOR (arg)->size + BOOL_VECTOR_BITS_PER_CHAR - 1) / BOOL_VECTOR_BITS_PER_CHAR);