1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-23 04:53:12 -08:00

(to_multibyte): Ensure read_buffer is at least twice

as large as the number of bytes to convert.
This commit is contained in:
Gerd Moellmann 2001-10-30 16:37:27 +00:00
parent acad394b53
commit acc5474d64

View file

@ -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;