Fix for 687314 - infinite recursion over circular resource links
Raph Levien <[email protected]> Wed, 23 Jun 2004 16:37:40 -0700
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <[email protected]> |
Insert a mark into the resource dictionary to do a depth-first search
of the Resource reference graph even when there are circularities.
Fixes bug #687314.
Index: lib/pdf_main.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_main.ps,v
retrieving revision 1.87
diff -C2 -r1.87 pdf_main.ps
*** lib/pdf_main.ps 1 Jun 2004 21:13:04 -0000 1.87
--- lib/pdf_main.ps 23 Jun 2004 23:34:08 -0000
***************
*** 1144,1147 ****
--- 1144,1149 ----
/resourceusestransparency { % <dict> resourceusestransparency <bool>
{ % Use loop to provide an exitable context.
+ dup /.resourceusestransparency_mark known { pop false exit } if
+ dup /.resourceusestransparency_mark true put
/Resources knownoget not { 0 dict } if
dup /ExtGState knownoget {