[gs-cvs] rev 7906 - trunk/gs/lib

alexcher at ghostscript.com alexcher at ghostscript.com
Mon May 7 12:45:03 PDT 2007


Author: alexcher
Date: 2007-05-07 12:45:03 -0700 (Mon, 07 May 2007)
New Revision: 7906

Modified:
   trunk/gs/lib/pdf_base.ps
Log:
Trap input errors when reading PDF content streams and issue a warning.
Acrobat Reader silently ignores such errors. Bug 689026, customer 850.

DIFFERENCES:
None


Modified: trunk/gs/lib/pdf_base.ps
===================================================================
--- trunk/gs/lib/pdf_base.ps	2007-05-07 19:18:29 UTC (rev 7905)
+++ trunk/gs/lib/pdf_base.ps	2007-05-07 19:45:03 UTC (rev 7906)
@@ -182,7 +182,12 @@
 	% bound into it.
   1 index cvlit count 2 sub 3 1 roll mark mark 5 2 roll
   {	% Stack: ..operands.. count opdict file
-    token {
+    { token } stopped {
+      dup type /filetype eq { pop } if % pop the operand if it is restored
+      (   **** Error reading a content stream. The page may be incomplete.\n)
+      pdfformaterror
+      //false
+    } if {
       dup type /nametype eq {
 	dup xcheck {
 	  .pdfexectoken



More information about the gs-cvs mailing list