tag 520940 patch
thanks

Here's a patch to fix this.  Works around by strdup-ing optarg.  The
free at the end could just be conditional, but this is simpler.

-- 
_________________________
Ryan Niebur
[email protected]
--- tempfile.c.orig	2009-03-23 14:40:10.000000000 -0700
+++ tempfile.c	2009-03-23 14:47:06.000000000 -0700
@@ -91,7 +91,9 @@
       }
       break;
     case 'n':
-      name = optarg;
+      // strdup because it is freed later on
+      if((name = strdup(optarg)) == NULL)
+        syserror("strdup");
       break;
     case 'h':
       usage(0);

Attachment: signature.asc
Description: Digital signature

Reply via email to