Possible fix for 687090 and 687435, /ioerror in token
Alex Cherepanov <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
The problem is caused by an unterminated stream with some garbage at the end. We have 2 bug reports about this problem. In both cases running the file through "Length () /SubFileDecode" solves the problem. The patch attached is incomplete, but sufficient to demonstrate that running streams through /SubFileDecode is beneficial in some cases. Does anybody see any drawbacks ? _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
pdf_base.ps.diff
(text/plain, 718 B)
Index: gs/lib/pdf_base.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_base.ps,v
retrieving revision 1.42
diff -b -u -r1.42 pdf_base.ps
--- a/gs/lib/pdf_base.ps 19 Mar 2004 08:30:15 -0000 1.42
+++ b/gs/lib/pdf_base.ps 25 Apr 2004 02:36:07 -0000
@@ -798,6 +798,10 @@
% Stack: readdata? dict parms filternames
2 index /File get exch
% Stack: readdata? dict parms file/string filternames
+
+ % This is just a proof of concept, not a proposed patch
+ exch 3 index /Length oget () /SubFileDecode filter exch
+
pdf_decrypt_stream % add decryption if needed
dup length 0 eq {
% All the PDF filters have EOD markers, but in this case