Mercurial > emacs
diff src/process.c @ 89938:ab6b6e8cffe6
(read_process_output): Grow decoding_buf when needed;
this could cause a crash in allocate_string and compact_small_strings.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Thu, 13 May 2004 12:52:29 +0000 |
| parents | 68c22ea6027c |
| children | 4c90ffeb71c5 |
line wrap: on
line diff
--- 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);
