# HG changeset patch # User Kim F. Storm # Date 1084288570 0 # Node ID 43894b273b5e38bfa44120e356eb2fd3b234334d # Parent fd59a77109e5b96c047734e608110c2fab605dfd (read_process_output): Grow decoding_buf when needed; this could cause a crash in allocate_string and compact_small_strings. diff -r fd59a77109e5 -r 43894b273b5e src/process.c --- a/src/process.c Tue May 11 15:15:48 2004 +0000 +++ b/src/process.c Tue May 11 15:16:10 2004 +0000 @@ -4894,6 +4894,8 @@ } 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 @@ } } 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);