Blame SOURCES/a2ps-forward-null.patch

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