2001-10-30 Gerd Moellmann <gerd@gnu.org>
+ * lread.c (to_multibyte): Ensure read_buffer is at least twice
+ as large as the number of bytes to convert.
+
* lread.c (to_multibyte): New function.
(read1): Use it.
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;
if (c < 0)
end_of_file_error ();
+ if (p - read_buffer == 24183)
+ fprintf (stderr, "hello\n");
+
/* If purifying, and string starts with \ newline,
return zero instead. This is for doc strings
that we are really going to find in etc/DOC.nn.nn */