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

Caolán McNamara caolanm at redhat.com
Mon Sep 18 14:12:37 UTC 2017


 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 3e8ef0e1a40a14d1c2bdb5345ed59941c765356b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 18 15:10:49 2017 +0100

    ofz#3419 Null-dereference READ
    
    Change-Id: I32c5d5039034ac76262223e42a1f27d6f1b84cb5

diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 36ddf3df64cd..9b251804dfd2 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -621,14 +621,16 @@ void FreetypeFont::InitGlyphData(const GlyphItem& rGlyph, GlyphData& rGD ) const
 
     FT_Error rc = FT_Load_Glyph(maFaceFT, rGlyph.maGlyphId, mnLoadFlags);
 
-    if( rc != FT_Err_Ok )
+    if (rc != FT_Err_Ok)
         return;
 
     if (mbArtBold)
         FT_GlyphSlot_Embolden(maFaceFT->glyph);
 
     FT_Glyph pGlyphFT;
-    FT_Get_Glyph( maFaceFT->glyph, &pGlyphFT );
+    rc = FT_Get_Glyph(maFaceFT->glyph, &pGlyphFT);
+    if (rc != FT_Err_Ok)
+        return;
 
     ApplyGlyphTransform(rGlyph.IsVertical(), pGlyphFT);
 


More information about the Libreoffice-commits mailing list