[Sumover-dev] [svn commit] r4223 - rat/trunk

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Thu Jul 24 15:49:05 BST 2008


Author: douglask
Date: Thu Jul 24 15:47:33 2008
New Revision: 4223

Modified:
   rat/trunk/process.c

Log:
args pointer array was being under-allocated memory.

There still are some memory managment issues with the recently added -X argument code that need to resolved elsewhere in the code involving a corrupted token argument


Modified: rat/trunk/process.c
==============================================================================
--- rat/trunk/process.c	(original)
+++ rat/trunk/process.c	Thu Jul 24 15:47:33 2008
@@ -93,9 +93,9 @@
 	} else {
 		debug_msg("Running as root? PATH unmodified\n");
 	}
-	/* Fork off the sub-process... */
-		char **args = xmalloc(argc);
-		int numargs=0;
+        /* Fork off the sub-process... */
+        char **args = xmalloc((2 * num_tokens) + argc + 4);
+        int numargs=0;
         *pid = fork();
         if (*pid == -1) {
                 perror("Cannot fork");



More information about the Sumover-dev mailing list