[poppler] poppler/Annot.cc poppler/Annot.h
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Tue Mar 8 12:40:05 PST 2011
poppler/Annot.cc | 8 ++++++--
poppler/Annot.h | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit abe1e0d5a37bcdb4376901306d3adccfb33ff3b4
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Tue Mar 8 21:39:00 2011 +0100
annots: Make sure no border is drawn for invalid border arrays
Fixes regression on ClassSchedule_2091_ENGL.pdf
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 7b800ad..ef1aa64 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -439,7 +439,7 @@ AnnotBorder::AnnotBorder() {
style = borderSolid;
}
-void AnnotBorder::parseDashArray(Object *dashObj) {
+GBool AnnotBorder::parseDashArray(Object *dashObj) {
GBool correct = gTrue;
int tempLength = dashObj->arrayGetLength();
double *tempDash = (double *) gmallocn (tempLength, sizeof (double));
@@ -463,6 +463,8 @@ void AnnotBorder::parseDashArray(Object *dashObj) {
} else {
gfree (tempDash);
}
+
+ return correct;
}
AnnotBorder::~AnnotBorder() {
@@ -508,7 +510,9 @@ AnnotBorderArray::AnnotBorderArray(Array *array) {
if (arrayLength == 4) {
if (array->get(3, &obj1)->isArray())
- parseDashArray(&obj1);
+ correct = parseDashArray(&obj1);
+ else
+ correct = gFalse;
obj1.free();
}
} else {
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 4efd762..3126e53 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -233,7 +233,7 @@ public:
virtual AnnotBorderStyle getStyle() const { return style; }
protected:
- void parseDashArray(Object *dashObj);
+ GBool parseDashArray(Object *dashObj);
AnnotBorderType type;
double width;
More information about the poppler
mailing list