File r1936-Really-fix-CVE-2017-7382.patch of Package podofo.34527
------------------------------------------------------------------------
r1936 | mabri | 2018-08-24 23:40:46 +0200 (vie 24 de ago de 2018) | 1 línea
Really fix CVE-2017-7382
Index: src/doc/PdfFontFactory.cpp
===================================================================
--- src/doc/PdfFontFactory.cpp (revisión: 1935)
+++ src/doc/PdfFontFactory.cpp (revisión: 1936)
@@ -197,7 +197,13 @@
PODOFO_RAISE_ERROR( ePdfError_InvalidDataType );
}
- const PdfName & rSubType = pObject->GetDictionary().GetKey( PdfName::KeySubtype )->GetName();
+ PdfVariant* pSubTypeKey = pObject->GetDictionary()
+ .GetKey( PdfName::KeySubtype );
+ if ( NULL == pSubTypeKey )
+ {
+ PODOFO_RAISE_ERROR_INFO( ePdfError_InvalidDataType, "Font: No SubType" );
+ }
+ const PdfName & rSubType = pSubTypeKey->GetName();
if( rSubType == PdfName("Type0") )
{
// The PDF reference states that DescendantFonts must be an array,
------------------------------------------------------------------------