summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Cherepanov <alex.cherepanov@artifex.com>2011-05-10 00:21:21 -0400
committerAlex Cherepanov <alex.cherepanov@artifex.com>2011-05-10 01:31:16 -0400
commit0f5928344123e31229d31eb81e3f09b528170e38 (patch)
tree4623858a8ad9bb426779edb08f111675981b4220
parentdf4e669177f7757a5c054084f4990599bef5c355 (diff)
Execute linkdest procedure in a stopped context to trap errors caused
by out-of-range link destinations that can occur in an invalid files or during processing of a page range. Bug 692200.
-rw-r--r--gs/Resource/Init/pdf_main.ps8
1 files changed, 7 insertions, 1 deletions
diff --git a/gs/Resource/Init/pdf_main.ps b/gs/Resource/Init/pdf_main.ps
index c414ea73e..cc5bee7d0 100644
--- a/gs/Resource/Init/pdf_main.ps
+++ b/gs/Resource/Init/pdf_main.ps
@@ -1376,7 +1376,13 @@ end readonly def
} ifelse
} ifelse
} if
- linkdest pop /LNK pdfmark
+ { linkdest } stopped {
+ cleartomark
+ ( **** Warning: Link annotation points out of the document page range.\n)
+ pdfformaterror
+ } {
+ pop /LNK pdfmark
+ } ifelse
} bind def
end readonly def