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:
parent
acad394b53
commit
acc5474d64
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue