Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/Link.cc
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/xpdf/Link.cc')
-rw-r--r--pdf/xpdf/Link.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/pdf/xpdf/Link.cc b/pdf/xpdf/Link.cc
index 0c3a869..39b7ceb 100644
--- a/pdf/xpdf/Link.cc
+++ b/pdf/xpdf/Link.cc
@@ -2,7 +2,7 @@
//
// Link.cc
//
-// Copyright 1996-2002 Glyph & Cog, LLC
+// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
@@ -148,7 +148,7 @@ LinkDest::LinkDest(Array *a) {
// get page
if (a->getLength() < 2) {
- error(-1, "Annotation destination array has wrong length");
+ error(-1, "Annotation destination array is too short");
return;
}
a->getNF(0, &obj1);
@@ -219,16 +219,16 @@ LinkDest::LinkDest(Array *a) {
// Fit link
} else if (obj1.isName("Fit")) {
- if (a->getLength() != 2) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 2) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFit;
// FitH link
} else if (obj1.isName("FitH")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitH;
@@ -241,8 +241,8 @@ LinkDest::LinkDest(Array *a) {
// FitV link
} else if (obj1.isName("FitV")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitV;
@@ -255,8 +255,8 @@ LinkDest::LinkDest(Array *a) {
// FitR link
} else if (obj1.isName("FitR")) {
- if (a->getLength() != 6) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 6) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitR;
@@ -287,16 +287,16 @@ LinkDest::LinkDest(Array *a) {
// FitB link
} else if (obj1.isName("FitB")) {
- if (a->getLength() != 2) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 2) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitB;
// FitBH link
} else if (obj1.isName("FitBH")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitBH;
@@ -309,8 +309,8 @@ LinkDest::LinkDest(Array *a) {
// FitBV link
} else if (obj1.isName("FitBV")) {
- if (a->getLength() != 3) {
- error(-1, "Annotation destination array has wrong length");
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
goto err2;
}
kind = destFitBV;