File podofo-CVE-2019-20093.patch of Package podofo.23798
--- tools/podofoimgextract/ImageExtractor.cpp.orig 2018-02-25 05:48:38.000000000 -0600
+++ tools/podofoimgextract/ImageExtractor.cpp 2022-04-19 14:15:27.093029145 -0500
@@ -117,6 +117,11 @@ void ImageExtractor::ExtractImage( PdfOb
//long lBitsPerComponent = pObject->GetDictionary().GetKey( PdfName("BitsPerComponent" ) )->GetNumber();
// TODO: Handle colorspaces
+ if ( !pObject->GetDictionary().HasKey( PdfName("Width" ) ) || !pObject->GetDictionary().HasKey( PdfName("Height" ) ) )
+ {
+ PODOFO_RAISE_ERROR( ePdfError_BrokenFile );
+ }
+
// Create a ppm image
const char* pszPpmHeader = "P6\n# Image extracted by PoDoFo\n%" PDF_FORMAT_INT64 " %" PDF_FORMAT_INT64 "\n%li\n";