From: Gerd Moellmann Date: Tue, 30 Oct 2001 16:37:27 +0000 (+0000) Subject: (to_multibyte): Ensure read_buffer is at least twice X-Git-Tag: emacs-21.2~408 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=acc5474d64dee647213673614d6497c1d692e58a;p=emacs.git (to_multibyte): Ensure read_buffer is at least twice as large as the number of bytes to convert. --- diff --git a/src/lread.c b/src/lread.c index c94a1f291f0..8b78a7d3d7a 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1778,7 +1778,7 @@ to_multibyte (p, end, nchars) int nbytes; parse_str_as_multibyte (read_buffer, *p - read_buffer, &nbytes, nchars); - if (nbytes > read_buffer_size) + if (read_buffer_size < 2 * nbytes) { int offset = *p - read_buffer; read_buffer_size *= 2;