mgdiff (1.0-29) spawn.c

Summary

 spawn.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

--- mgdiff-1.0.orig/spawn.c
+++ mgdiff-1.0/spawn.c
@@ -1,4 +1,4 @@
-#ifndef lint
+#if 0
 static char rcsid[] = "spawn.c,v 2.0 1994/05/19 02:01:23 dan Exp";
 #endif
 
@@ -35,6 +35,11 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#include <X11/Intrinsic.h>
+
+#include "mgdiff.h"
+#include "externs.h"
+
 #define BLOCKSIZE 10
 
 /* 
@@ -105,7 +110,7 @@
 	argv[argc++] = NULL;
 
 	if (execvp (prog, argv) == -1) {
-	    (void) sprintf (buffer, "%s: %s: %s", progname, "exec", prog);
+	    (void) snprintf (buffer, sizeof (buffer), "%s: %s: %s", progname, "exec", prog);
 	    perror (buffer);
 	    exit (2);
 	}
@@ -131,4 +136,5 @@
 	break;
     }
     /* NOTREACHED */
+    return NULL;
 }