[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 20 11:55:37 UTC 2020


 vcl/source/gdi/salgdilayout.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit af174dbad4f4dc896bc090215d08c12d080b8e72
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 20 11:36:19 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 20 13:54:54 2020 +0200

    cid#1466875 Dereference null return value
    
    Change-Id: I6208d2d6e6592db89223c8a8705f7f1ba066f16e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103068
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 02c316b7b39d..f277970b6671 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -1020,6 +1020,8 @@ bool SalGraphics::CreateCFFfontSubset(const unsigned char* pFontBytes, int nByte
                                       int nGlyphCount, FontSubsetInfo& rInfo)
 {
     FILE* pOutFile = fopen(rSysPath.getStr(), "wb");
+    if (!pOutFile)
+        return false;
     rInfo.LoadFont(FontType::CFF_FONT, pFontBytes, nByteLength);
     bool bRet = rInfo.CreateFontSubset(FontType::TYPE1_PFB, pOutFile, nullptr, pGlyphIds, pEncoding,
                                        nGlyphCount, pGlyphWidths);


More information about the Libreoffice-commits mailing list