blob: 22de747e01e42221fede15e46e5b4bde173effe2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
https://bugs.gentoo.org/843311
From: Sam James <sam@gentoo.org>
Date: Sun, 8 May 2022 21:22:49 +0000
Subject: [PATCH] Add missing nSize set for Poppler 22.04.0
Thanks-to: Stephan Hartmann <sultan@gentoo.org>
--- 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<std::vector<unsigned char>> 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<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
+ if( pBuf )
+ {
+ nSize = pBuf->size();
+ }
#endif
if( !pBuf )
return;
|