Commit abe1e0d5 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

annots: Make sure no border is drawn for invalid border arrays

Fixes regression on ClassSchedule_2091_ENGL.pdf
parent 14d14537
......@@ -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 {
......
......@@ -233,7 +233,7 @@ public:
virtual AnnotBorderStyle getStyle() const { return style; }
protected:
void parseDashArray(Object *dashObj);
GBool parseDashArray(Object *dashObj);
AnnotBorderType type;
double width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment