Mercurial > emacs
diff src/process.c @ 55534:43894b273b5e
(read_process_output): Grow decoding_buf when needed;
this could cause a crash in allocate_string and compact_small_strings.
| author | Kim F. Storm <storm@cua.dk> |
|---|---|
| date | Tue, 11 May 2004 15:16:10 +0000 |
| parents | 05e8ea84c376 |
| children | 234873044c2a |
line wrap: on
line diff
--- 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);
