From: Simon Ruderich <simon@ruderich.org>
Subject: Allow compilation with -Werror=format-security
Bug-Debian: http://bugs.debian.org/700313
X-Debian-version: 1:4.11.1-2

--- a/src/shar.c
+++ b/src/shar.c
@@ -513,7 +513,7 @@
 
   if (stat (local_name, &struct_stat))
     {
-      error (0, errno, local_name);
+      error (0, errno, "%s", local_name);
       return 1;
     }
 
@@ -522,7 +522,7 @@
 
   if (directory = opendir (local_name), !directory)
     {
-      error (0, errno, local_name);
+      error (0, errno, "%s", local_name);
       return 1;
     }
 
@@ -615,7 +615,7 @@
 #else
   if (closedir (directory))
     {
-      error (0, errno, local_name);
+      error (0, errno, "%s", local_name);
       return 1;
     }
 #endif
@@ -666,7 +666,7 @@
     int status = stat (local_name_copy, &struct_stat);
 
     if (status != 0)
-      error (0, errno, local_name_copy);
+      error (0, errno, "%s", local_name_copy);
     else
       status = (*routine) (local_name_copy, restore_name);
 
--- a/src/unshar.c
+++ b/src/unshar.c
@@ -453,7 +453,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);
         }
@@ -511,13 +511,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);
