# HG changeset patch # User Kenichi Handa # Date 1084452749 0 # Node ID ab6b6e8cffe6c414527357c9498e4f399d331a13 # Parent 48c84a32cc689ae300c051b32cd837db2694394a (read_process_output): Grow decoding_buf when needed; this could cause a crash in allocate_string and compact_small_strings. diff -r 48c84a32cc68 -r ab6b6e8cffe6 src/process.c --- a/src/process.c Thu Apr 29 10:00:27 2004 +0000 +++ b/src/process.c Thu May 13 12:52:29 2004 +0000 @@ -4896,6 +4896,8 @@ if (coding->carryover_bytes > 0) { + if (SCHARS (p->decoding_buf) < coding->carryover_bytes) + p->decoding_buf = make_uninit_string (coding->carryover_bytes); bcopy (coding->carryover, SDATA (p->decoding_buf), coding->carryover_bytes); XSETINT (p->decoding_carryover, coding->carryover_bytes); @@ -5002,6 +5004,8 @@ } if (coding->carryover_bytes > 0) { + if (SCHARS (p->decoding_buf) < coding->carryover_bytes) + p->decoding_buf = make_uninit_string (coding->carryover_bytes); bcopy (coding->carryover, SDATA (p->decoding_buf), coding->carryover_bytes); XSETINT (p->decoding_carryover, coding->carryover_bytes);