diff options
| author | Richard M. Stallman | 1998-08-19 17:44:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-08-19 17:44:21 +0000 |
| commit | 76ba958178ab1cf4cf159c6f95006a4f175baf6c (patch) | |
| tree | fdff1f08a5ac2ffce4ea6e732088d53c2c6c0c24 /src | |
| parent | c683d70bd84038b315fe578986b7918ae9b36b6b (diff) | |
| download | emacs-76ba958178ab1cf4cf159c6f95006a4f175baf6c.tar.gz emacs-76ba958178ab1cf4cf159c6f95006a4f175baf6c.zip | |
(Fcall_process): Use malloc for decoding_buf.emacs-20.3
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c index 6a1cfbc2c46..f30087d09e4 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -677,7 +677,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 677 | else | 677 | else |
| 678 | { /* We have to decode the input. */ | 678 | { /* We have to decode the input. */ |
| 679 | int size = decoding_buffer_size (&process_coding, nread); | 679 | int size = decoding_buffer_size (&process_coding, nread); |
| 680 | char *decoding_buf = (char *) alloca (size); | 680 | char *decoding_buf = (char *) malloc (size); |
| 681 | 681 | ||
| 682 | decode_coding (&process_coding, bufptr, decoding_buf, | 682 | decode_coding (&process_coding, bufptr, decoding_buf, |
| 683 | nread, size); | 683 | nread, size); |
| @@ -689,6 +689,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 689 | there's a possibility that the detection was | 689 | there's a possibility that the detection was |
| 690 | done by insufficient data. So, we give up | 690 | done by insufficient data. So, we give up |
| 691 | displaying on the fly. */ | 691 | displaying on the fly. */ |
| 692 | free (decoding_buf); | ||
| 692 | display_on_the_fly = 0; | 693 | display_on_the_fly = 0; |
| 693 | process_coding = saved_coding; | 694 | process_coding = saved_coding; |
| 694 | carryover = nread; | 695 | carryover = nread; |
| @@ -696,6 +697,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 696 | } | 697 | } |
| 697 | if (process_coding.produced > 0) | 698 | if (process_coding.produced > 0) |
| 698 | insert (decoding_buf, process_coding.produced); | 699 | insert (decoding_buf, process_coding.produced); |
| 700 | free (decoding_buf); | ||
| 699 | carryover = nread - process_coding.consumed; | 701 | carryover = nread - process_coding.consumed; |
| 700 | if (carryover > 0) | 702 | if (carryover > 0) |
| 701 | { | 703 | { |