From 3c65d810eefe4e97bed790d7a49772311ae6de8d Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Mon, 10 Feb 2014 20:29:35 +0200 Subject: [PATCH] Tagged-PDF: Fix parsing of attached element attributes The wrong object was used as attribute dictionary, which caused a segmentation fault when parsing PDF files in which the structure elements included attributes attached to them. This patch fixes the issue. Thanks to Joanmarie Diggs for helping in debugging the problem. --- poppler/StructElement.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poppler/StructElement.cc b/poppler/StructElement.cc index c3724b8..ba859e9 100644 --- a/poppler/StructElement.cc +++ b/poppler/StructElement.cc @@ -1158,7 +1158,7 @@ void StructElement::parse(Dict *element) for (int i = 0; i < obj.arrayGetLength(); i++) { if (obj.arrayGet(i, &iobj)->isDict()) { attrIndex = getNumAttributes(); - parseAttributes(obj.getDict()); + parseAttributes(iobj.getDict()); } else if (iobj.isInt()) { const int revision = iobj.getInt(); // Set revision numbers for the elements previously created. -- 1.8.5.4