1
Fork 0
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:
Kim F. Storm 2004-05-11 15:16:10 +00:00
parent b47e779e52
commit d7d2483aed

View file

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