diff options
author | Albert Astals Cid <aacid@kde.org> | 2019-10-09 10:08:36 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2019-10-09 10:08:36 +0200 |
commit | 80de4789e70b69d913362566d2f84642eec9ac51 (patch) | |
tree | a99384b4afea0fc1927b9773b22ff0b4ac117998 | |
parent | 498883b5397b3b951b5d41d17641ecf2ffe9b801 (diff) |
Fix assert on malformed documents
-rw-r--r-- | poppler/Form.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/poppler/Form.cc b/poppler/Form.cc index 07521526..e5a5d875 100644 --- a/poppler/Form.cc +++ b/poppler/Form.cc @@ -1441,7 +1441,12 @@ FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object &&aobj, const Ref refA, Fo } else if (obj1.isArray()) { for (int i = 0; i < numChoices; i++) { for (int j = 0; j < obj1.arrayGetLength(); j++) { - Object obj2 = obj1.arrayGet(j); + const Object obj2 = obj1.arrayGet(j); + if (!obj2.isString()) { + error(errSyntaxError, -1, "FormWidgetChoice:: V array contains a non string object"); + continue; + } + bool matches = false; if (choices[i].exportVal) { |