From acc5474d64dee647213673614d6497c1d692e58a Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 30 Oct 2001 16:37:27 +0000 Subject: [PATCH] (to_multibyte): Ensure read_buffer is at least twice as large as the number of bytes to convert. --- src/lread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2