Bug 687738, /undefinedresult in --div--
Alex Cherepanov <[email protected]> Thu, 07 Oct 2004 11:05:47 -0400
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Add a check for an empty BBox in annotations and default to no scaling. Bug 687738 from customer 770. _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
687738.diff
(text/plain, 783 B)
Index: gs/lib/pdf_draw.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_draw.ps,v
retrieving revision 1.86
diff -b -c -r1.86 pdf_draw.ps
*** gs/lib/pdf_draw.ps 20 Sep 2004 23:28:24 -0000 1.86
--- gs/lib/pdf_draw.ps 7 Oct 2004 14:53:05 -0000
***************
*** 1263,1269 ****
--- 1263,1275 ----
/BBox knownoget {
exch pop % discard y height
aload pop pop exch pop sub % BBox width
+ dup 0 ne {
div % scale x widths
+ } {
+ pop pop 1
+ ( **** Warning: Annotation has empty BBox; use unity scaling.\n)
+ pdfformaterror
+ } ifelse
dup 0 lt { neg } if % get magnitude
} {
pop pop 1 % default to unity scaling