# HG changeset patch # User Gerd Moellmann # Date 1004459707 0 # Node ID 81ab7b9aefcc3e8f590eac34e261230a09a02ff3 # Parent 8330d988f4aa27b4b4f34346d044ada66f1a67ed (to_multibyte): Ensure read_buffer is at least twice as large as the number of bytes to convert. diff -r 8330d988f4aa -r 81ab7b9aefcc src/lread.c --- a/src/lread.c Tue Oct 30 16:10:09 2001 +0000 +++ b/src/lread.c Tue Oct 30 16:35:07 2001 +0000 @@ -1790,7 +1790,7 @@ 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; @@ -2239,6 +2239,9 @@ 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 */