shithub: neatpost

Download patch

ref: 68105edadd43760d125c11670b8a25cedf31901b
parent: 1d88be4e3bd71b54af7c2ce8f3636e07c6250ce2
author: Ali Gholami Rudi <ali@rudi.ir>
date: Mon Sep 15 05:18:18 EDT 2014

out: ignore invalid font requests

Without this patch bad font requests may cause segmentation
faults (fX where X has not been mounted).  This was reported
by Carsten Kunze <carsten.kunze@arcor.de>.

--- a/out.c
+++ b/out.c
@@ -129,7 +129,8 @@
 
 void outfont(int f)
 {
-	o_f = f;
+	if (dev_font(f))
+		o_f = f;
 }
 
 /* a font was mounted at pos f */