changeset 23079:0e2635f13ea9 EMACS_20_3

(Fcall_process): Use malloc for decoding_buf.
author Richard M. Stallman <rms@gnu.org>
date Wed, 19 Aug 1998 17:44:21 +0000
parents 18d2ab8a8a62
children 8b7bb810f362
files src/callproc.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Wed Aug 19 07:27:13 1998 +0000
+++ b/src/callproc.c	Wed Aug 19 17:44:21 1998 +0000
@@ -677,7 +677,7 @@
 	    else
 	      {			/* We have to decode the input.  */
 		int size = decoding_buffer_size (&process_coding, nread);
-		char *decoding_buf = (char *) alloca (size);
+		char *decoding_buf = (char *) malloc (size);
 
 		decode_coding (&process_coding, bufptr, decoding_buf,
 			       nread, size);
@@ -689,6 +689,7 @@
 		       there's a possibility that the detection was
 		       done by insufficient data.  So, we give up
 		       displaying on the fly.  */
+		    free (decoding_buf);
 		    display_on_the_fly = 0;
 		    process_coding = saved_coding;
 		    carryover = nread;
@@ -696,6 +697,7 @@
 		  }
 		if (process_coding.produced > 0)
 		  insert (decoding_buf, process_coding.produced);
+		free (decoding_buf);
 		carryover = nread - process_coding.consumed;
 		if (carryover > 0)
 		  {