From de41a8106952ceb1d14dd25564fa5eba1ced9110 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 14 Jun 2011 15:41:38 -0700 Subject: [PATCH] * fns.c (Fcopy_sequence): Don't assume vector length fits in int. --- src/ChangeLog | 1 + src/fns.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.2