[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/unx

Caolán McNamara caolanm at redhat.com
Tue Sep 19 18:22:05 UTC 2017


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

New commits:
commit c97c13b45411a4eeeca10912518c8966810e7be4
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
    (cherry picked from commit 3e8ef0e1a40a14d1c2bdb5345ed59941c765356b)
    Reviewed-on: https://gerrit.libreoffice.org/42464
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index c4341fe27176..a3a9f6f5faab 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -636,14 +636,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