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

alexcher at ghostscript.com alexcher at ghostscript.com
Wed May 23 11:51:55 PDT 2007


Author: alexcher
Date: 2007-05-23 11:51:55 -0700 (Wed, 23 May 2007)
New Revision: 7998

Modified:
   trunk/gs/lib/pdf_draw.ps
   trunk/gs/lib/pdf_main.ps
Log:
Fix handling of uncompressed contect streams with incorrect Length parameter
or missing endstream operator. Use operator obj as one more way to detect
the end of the stream. Bug 689239.

DIFFERENCES:
None


Modified: trunk/gs/lib/pdf_draw.ps
===================================================================
--- trunk/gs/lib/pdf_draw.ps	2007-05-23 09:38:12 UTC (rev 7997)
+++ trunk/gs/lib/pdf_draw.ps	2007-05-23 18:51:55 UTC (rev 7998)
@@ -1292,8 +1292,9 @@
 		% XObject lacks Type and Subtype keys.  This is illegal,
 		% but Acrobat Reader accepts it.  The only way we can
 		% tell whether this is a Form or a set of sub-appearances
-		% is by testing for the stream Length key.
-      dup /Length known {
+		% is by testing for the stream Length or File key.
+                % If the stream lacks Length key, try File key.
+      dup /Length known 1 index /File known or {
       		% If this is a form then simply use it
         true
       } {

Modified: trunk/gs/lib/pdf_main.ps
===================================================================
--- trunk/gs/lib/pdf_main.ps	2007-05-23 09:38:12 UTC (rev 7997)
+++ trunk/gs/lib/pdf_main.ps	2007-05-23 18:51:55 UTC (rev 7998)
@@ -40,7 +40,10 @@
   drawopdict { } forall
   /endstream { exit } bind
   (%%EOF) cvn { exit } bind		% for filters
-	% PDF 1.1 operators
+  /obj { (   **** Warning: Content stream is not terminated by 'endstream'.\n)
+         pdfformaterror pop pop exit
+       } bind
+       	% PDF 1.1 operators
   /BX { /BXlevel BXlevel 1 add store } bind
   /EX { /BXlevel BXlevel 1 sub store } bind
   /PS { cvx exec } bind



More information about the gs-cvs mailing list