You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
podofo/podofo_CVE-2018-11255.patch

18 lines
1.0 KiB

diff -rupN podofo-0.9.6/src/doc/PdfPage.cpp podofo-0.9.6-new/src/doc/PdfPage.cpp
--- podofo-0.9.6/src/doc/PdfPage.cpp 2018-03-11 20:40:59.000000000 +0100
+++ podofo-0.9.6-new/src/doc/PdfPage.cpp 2019-03-13 23:15:12.206138732 +0100
@@ -595,6 +595,13 @@ unsigned int PdfPage::GetPageNumber() co
while( it != kids.end() && (*it).GetReference() != ref )
{
PdfObject* pNode = this->GetObject()->GetOwner()->GetObject( (*it).GetReference() );
+ if (!pNode)
+ {
+ std::ostringstream oss;
+ oss << "Object " << (*it).GetReference().ToString() << " not found from Kids array "
+ << pKids->Reference().ToString();
+ PODOFO_RAISE_ERROR_INFO( ePdfError_NoObject, oss.str() );
+ }
if( pNode->GetDictionary().GetKey( PdfName::KeyType ) != NULL
&& pNode->GetDictionary().GetKey( PdfName::KeyType )->GetName() == PdfName( "Pages" ) )