summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/pdfio/pdfdocument.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-02-27 12:31:07 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-02-27 13:28:10 +0000
commita9a9b8155f65421fa8cb2bf108b847f212462f4f (patch)
tree5be404ab4e944f7f83cb104f931f2d35ee77cffd /xmlsecurity/source/pdfio/pdfdocument.cxx
parent597fd6c8c281381f2205a6d4dd7920ce0079ef7d (diff)
xmlsecurity PDF verify: fix parsing of nested dictionaries
This is triggered by an upcoming unit test for tdf#105093. Change-Id: I3c8e8662fcadaea1f6e19bf6194d8159916f368b Reviewed-on: https://gerrit.libreoffice.org/34678 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'xmlsecurity/source/pdfio/pdfdocument.cxx')
-rw-r--r--xmlsecurity/source/pdfio/pdfdocument.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 50174483a832..6ffe711363c1 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -2974,7 +2974,7 @@ size_t PDFDictionaryElement::Parse(const std::vector< std::unique_ptr<PDFElement
else
{
// Nested dictionary.
- nIndex = PDFDictionaryElement::Parse(rElements, pDictionary, pDictionary->m_aItems);
+ i = PDFDictionaryElement::Parse(rElements, pDictionary, pDictionary->m_aItems);
rDictionary[aName] = pDictionary;
aName.clear();
}
@@ -2987,7 +2987,7 @@ size_t PDFDictionaryElement::Parse(const std::vector< std::unique_ptr<PDFElement
// Last dictionary end, track length and stop parsing.
if (pThisObject)
pThisObject->SetDictionaryLength(pEndDictionary->GetLocation() - nDictionaryOffset);
- nRet = nIndex;
+ nRet = i;
break;
}
}