https://bugs.gentoo.org/843311 From: Sam James Date: Sun, 8 May 2022 21:22:49 +0000 Subject: [PATCH] Add missing nSize set for Poppler 22.04.0 Thanks-to: Stephan Hartmann --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -478,6 +478,10 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* st char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); #else std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); + if( pBuf ) + { + nSize = pBuf->size(); + } #endif if( pBuf ) { @@ -502,6 +506,10 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); #else std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); + if( pBuf ) + { + nSize = pBuf->size(); + } #endif if( !pBuf ) return;