[gs-cvs] gs/lib
Ray Johnston
ray at casper.ghostscript.com
Tue Jun 25 11:58:58 PDT 2002
Update of /cvs/ghostscript/gs/lib
In directory casper:/tmp/cvs-serv29424/lib
Modified Files:
pdf_font.ps
Log Message:
Fix: If the Differences list in the Encoding of an embedded font in a PDF
was not in increasing order, the encoding array length needed for the
differences could be miscalculated. Thanks to Dave Slattengren for spotting
this. No files had been seen (yet) that tripped on this.
Index: pdf_font.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_font.ps,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- pdf_font.ps 22 Jun 2002 05:48:47 -0000 1.40
+++ pdf_font.ps 25 Jun 2002 18:58:55 -0000 1.41
@@ -36,10 +36,13 @@
% Calculate the length of the result.
% in case the incoming Encoding is null, use .notdefEncoding
exch dup null eq { pop .notdefEncoding } if
- 0 2 index {
+ 0 0 3 index {
dup type /nametype ne { exch pop } { pop 1 add } ifelse
+ % Differences list may not be in order, update the largest_index
+ % stack: <Differences> <encoding> <largest_index> <at_index>
+ 2 copy lt { exch pop dup } if % at_index is new largest
} forall
- 1 index length .max array dup 0 4 -1 roll putinterval
+ pop 1 index length .max array dup 0 4 -1 roll putinterval
exch 0 exch {
% Stack: enc' code element
dup type /nametype ne
More information about the gs-cvs
mailing list