Blob Blame Raw
diff -up a2ps-4.14/lib/encoding.c.bad-free a2ps-4.14/lib/encoding.c
--- a2ps-4.14/lib/encoding.c.bad-free	2013-04-30 11:49:50.511962062 +0100
+++ a2ps-4.14/lib/encoding.c	2013-04-30 11:52:18.682573468 +0100
@@ -541,7 +541,9 @@ encoding_resolve_font_substitute (struct
     {
       /* Find if there is a substitute for that font */
       res = pair_get (encoding->substitutes, font_name);
-      if (!res)
+      if (res)
+        res = xstrdup (res);
+      else
 	/* No. Check if this font is supported */
 	if (font_exists (job, font_name))
 	  /* Avoid returning sth alloca'd */