diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 8b5d630..478217f 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -4539,6 +4539,13 @@ void AnnotWidget::drawListBox(FormFieldChoice *fieldChoice, wMax = 0; for (i = 0; i < fieldChoice->getNumChoices(); ++i) { j = 0; + if (fieldChoice->getChoice(i) == NULL) { + error(errSyntaxError, -1, "Invalid annotation listbox"); + if (daToks) { + deleteGooList(daToks, GooString); + } + return; + } layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, NULL, gFalse); if (w > wMax) { wMax = w;