Tags: patch

Please could you include an update of libpoppler5 that fixes this
problem for the next Squeeze point release. Attached is a patch that I
took from the poppler git repository [1] and tested with 0.12.4-1.2 in
squeeze. The problem is _really_ annoying, and really doesn't present
a polished product to the user from Debian, and this patch applies
cleanly and fixes the problem

Gordon

[1] 
http://cgit.freedesktop.org/poppler/poppler/commit/?id=4ed53e30e735b79c46eab9d54883531c6e187b17

-- 
Gordon Farquharson
GnuPG Key ID: 32D6D676
From 4ed53e30e735b79c46eab9d54883531c6e187b17 Mon Sep 17 00:00:00 2001
From: William Bader <williamba...@hotmail.com>
Date: Fri, 23 Apr 2010 21:52:24 +0000
Subject: Silence some Illegal entry in bfrange block in ToUnicode CMap

Fixes #27728
---
diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index 5941190..80fd4c5 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -307,8 +308,10 @@ void CharCodeToUnicode::parseCMap1(int (*getCharFunc)(void *), void *data,
 	  error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
 	  break;
 	}
-	if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
-	      n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
+	if (!(((n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>') ||
+	       (n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')) &&
+	      ((n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>') ||
+	       (n2 == 4 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')))) {
 	  error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
 	  continue;
 	}

Reply via email to