Fix for bug 687457, rangecheck in --get-- with the attached file

Alex Cherepanov <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Organization Coscript Software
Message-ID <[email protected]>
The sample file generated by Crystal contains a TT font with
invalid 0-length tables: 'cvt ', 'fpgm', 'prep' . Ignore them
and issue a warning.

[Log message]
Ignore 0-length tables that occur in PDF files generated by Crystal.

_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
gs_ttf.ps.diff (text/plain, 684 B)
Index: gs/lib/gs_ttf.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_ttf.ps,v
retrieving revision 1.37
diff -b -u -r1.37 gs_ttf.ps
--- a/gs/lib/gs_ttf.ps	14 Mar 2004 22:02:44 -0000	1.37
+++ b/gs/lib/gs_ttf.ps	7 May 2004 13:53:58 -0000
@@ -625,7 +625,12 @@
     tables exch 16 getinterval
     TTFDEBUG { dup .printtab } if
     dup 0 4 getinterval readtables_ 1 index known {
+      1 index 12 4 getinterval (\0\0\0\0) eq {
+        (   **** Warning: Zero-length ') print print (' TT font table ignored.) = flush
+        pop
+      } {
       tabdict exch 2 index put
+      } ifelse
     } {
       pop pop
     } ifelse
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.