mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
(read_process_output): Grow decoding_buf when needed;
this could cause a crash in allocate_string and compact_small_strings.
This commit is contained in:
parent
b47e779e52
commit
d7d2483aed
1 changed files with 4 additions and 0 deletions
|
|
@ -4894,6 +4894,8 @@ read_process_output (proc, channel)
|
|||
}
|
||||
|
||||
carryover = nbytes - coding->consumed;
|
||||
if (SCHARS (p->decoding_buf) < carryover)
|
||||
p->decoding_buf = make_uninit_string (carryover);
|
||||
bcopy (chars + coding->consumed, SDATA (p->decoding_buf),
|
||||
carryover);
|
||||
XSETINT (p->decoding_carryover, carryover);
|
||||
|
|
@ -4998,6 +5000,8 @@ read_process_output (proc, channel)
|
|||
}
|
||||
}
|
||||
carryover = nbytes - coding->consumed;
|
||||
if (SCHARS (p->decoding_buf) < carryover)
|
||||
p->decoding_buf = make_uninit_string (carryover);
|
||||
bcopy (chars + coding->consumed, SDATA (p->decoding_buf),
|
||||
carryover);
|
||||
XSETINT (p->decoding_carryover, carryover);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue