[gs-cvs] gs/lib
Raph Levien
raph at casper.ghostscript.com
Tue Jul 9 23:29:36 PDT 2002
Update of /cvs/ghostscript/gs/lib
In directory casper:/tmp/cvs-serv12148/lib
Modified Files:
gs_ttf.ps
Log Message:
Fix: Avoid opstack overflow by explicit array construction, rather
than unpacking and padding on the stack, for padding of glyphencoding
array. Fixes SF bug #576651.
Index: gs_ttf.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_ttf.ps,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- gs_ttf.ps 25 Jun 2002 06:40:10 -0000 1.15
+++ gs_ttf.ps 10 Jul 2002 06:29:34 -0000 1.16
@@ -723,9 +723,17 @@
} if
% If necessary, fabricate additional glyphencoding entries
% to cover all of loca, or truncate glyphencoding.
- glyphencoding length numloca lt {
- /glyphencoding [ glyphencoding aload pop
- counttomark 1 numloca 1 sub { .nname } for ] def
+ glyphencoding length numloca dup lt {
+ /glyphencoding numloca array
+ glyphencoding length dup 1 sub 0 1 3 2 roll {
+ dup glyphencoding exch get
+ 3 index 3 1 roll put
+ } for
+ % /glyphencoding <newarray> <glyphencoding length>
+ 1 numloca 1 sub {
+ 1 index exch dup .nname put
+ } for
+ def
} {
/glyphencoding glyphencoding 0 numloca getinterval def
} ifelse
More information about the gs-cvs
mailing list