From d40ed12220324e688a9bc68495a379acd22f8be9 Mon Sep 17 00:00:00 2001
From: Pompolic <pompolic@special-circumstanc.es>
Date: Fri, 14 Feb 2020 16:18:17 +0100
Subject: [PATCH] FIX: whitespace between hex digits can occur

---
 pdf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pdf.c b/pdf.c
index 3e4cb37..40223ec 100644
--- a/pdf.c
+++ b/pdf.c
@@ -1072,7 +1072,7 @@ ASCIIHexDecode(const Dict *parms, HBytes b, HParser *p)
 	H_ARULE(hupper,	h_ch_range('A', 'F'));
 	H_RULE(ahexeod,	h_ch('>'));
 	H_RULE(hdigit,	CHX(digit, hlower, hupper));
-	H_RULE(hdigitpair, h_middle(SEQ(lwchar),SEQ(hdigit,hdigit),SEQ(lwchar)));
+	H_RULE(hdigitpair, SEQ(h_many(CHX(lwchar,hdigit)),h_many(CHX(lwchar,hdigit))));
 	H_ARULE(ahextruncated, SEQ(hdigit,ahexeod));
 
 	H_RULE(hs_end, CHX(hdigitpair, ahextruncated));
-- 
GitLab