Blame SOURCES/a2ps-forward-null.patch

8f1c6e
diff -up a2ps-4.14/lib/pathwalk.c.forward-null a2ps-4.14/lib/pathwalk.c
8f1c6e
--- a2ps-4.14/lib/pathwalk.c.forward-null	2011-08-10 16:06:53.185942197 +0100
8f1c6e
+++ a2ps-4.14/lib/pathwalk.c	2011-08-10 16:08:36.831030924 +0100
8f1c6e
@@ -348,12 +348,12 @@ xpw_find_included_file (char * const *pa
8f1c6e
     /* Relative.  Give its root. */
8f1c6e
     dir = dir_name (including_file);
8f1c6e
 
8f1c6e
-  res = ALLOCA (char, (strlen (dir)
8f1c6e
+  res = ALLOCA (char, ((dir ? strlen (dir) : 0)
8f1c6e
 		       + strlen (name)
8f1c6e
 		       + (suffix ? strlen (suffix) : 0)
8f1c6e
 		       + 2));
8f1c6e
-  sprintf (res, "%s%c%s%s", dir, DIRECTORY_SEPARATOR,
8f1c6e
-	   name, suffix ? suffix : "");
8f1c6e
+  sprintf (res, "%s%c%s%s", dir ? dir : "", DIRECTORY_SEPARATOR,
8f1c6e
+	   dir ? name : name + 1, suffix ? suffix : "");
8f1c6e
   XFREE (dir);
8f1c6e
   if (stat (res, &statbuf) == 0)
8f1c6e
     return xstrdup (res);