[poppler] [PATCH] Tagged-PDF: Fix parsing of attached element attributes
Albert Astals Cid
aacid at kde.org
Mon Feb 10 11:26:27 PST 2014
El Dilluns, 10 de febrer de 2014, a les 20:34:49, Adrian Perez de Castro va
escriure:
> 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.
Do we have some command line program that runs over a file and prints the
structure elements?
If not, it'd be great to have one so that we can run it over all files of the
testsuite and see which crash, etc. And also find potential regressions.
Cheers,
Albert
>
> Thanks to Joanmarie Diggs <jdiggs at igalia.com> 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.
More information about the poppler
mailing list