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