changeset 18489:42257ed9c7e3

(Fcall_process): Avoid storing alloca result directly into array element.
author Richard M. Stallman <rms@gnu.org>
date Sat, 28 Jun 1997 23:45:26 +0000
parents 3a7fb597e8a8
children 892910c06f24
files src/callproc.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Sat Jun 28 23:28:13 1997 +0000
+++ b/src/callproc.c	Sat Jun 28 23:45:26 1997 +0000
@@ -391,8 +391,10 @@
 	    int size = encoding_buffer_size (&argument_coding,
 					     XSTRING (args[i])->size);
 	    int produced, dummy;
+	    unsigned char *dummy = (unsigned char *) alloca (size);
 
-	    new_argv[i - 3] = (unsigned char *) alloca (size);
+	    /* The Irix 4.0 compiler barfs if we eliminate dummy.  */
+	    new_argv[i - 3] = dummy;
 	    produced = encode_coding (&argument_coding,
 				      XSTRING (args[i])->data, new_argv[i - 3],
 				      XSTRING (args[i])->size, size, &dummy);