Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > 8afa776f831fd252717a3c36d94439a1 > files > 1

sharutils-4.7-5mdv2009.1.src.rpm

--- src/unshar.c.orig	2009-03-08 02:52:07.000000000 +0100
+++ src/unshar.c	2009-03-08 02:53:27.000000000 +0100
@@ -457,7 +457,7 @@
               strcpy (cp, arg);
             }
           if (file = fopen (name_buffer, "r"), !file)
-            error (EXIT_FAILURE, errno, name_buffer);
+            error (EXIT_FAILURE, errno, "%s", name_buffer);
           unarchive_shar_file (name_buffer, file);
           fclose (file);
         }
@@ -515,13 +515,13 @@
   {
     int fd = mkstemp (pz_fname);
     if (fd < 0)
-      error (EXIT_FAILURE, errno, pz_fname);
+      error (EXIT_FAILURE, errno, "%s", pz_fname);
 
     fp = fdopen (fd, "w+");
   }
 
   if (fp == NULL)
-    error (EXIT_FAILURE, errno, pz_fname);
+    error (EXIT_FAILURE, errno, "%s", pz_fname);
 
   {
     char *buf = malloc (pg_sz);
--- src/shar.c.orig	2009-03-08 02:54:45.000000000 +0100
+++ src/shar.c	2009-03-08 02:55:52.000000000 +0100
@@ -385,7 +385,7 @@
 
   if (stat (local_name, &struct_stat))
     {
-      error (0, errno, local_name);
+      error (0, errno, "%s", local_name);
       return 1;
     }
 
@@ -394,7 +394,7 @@
 
   if (directory = opendir (local_name), !directory)
     {
-      error (0, errno, local_name);
+      error (0, errno, "%s", local_name);
       return 1;
     }
 
@@ -487,7 +487,7 @@
 #else
   if (closedir (directory))
     {
-      error (0, errno, local_name);
+      error (0, errno, "%s", local_name);
       return 1;
     }
 #endif