[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - vcl/unx

Caolán McNamara caolanm at redhat.com
Thu Mar 1 12:27:49 UTC 2018


Rebased ref, commits from common ancestor:
commit f3339871c7d8d77f76dea56b3126a1d7c3bcbe48
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 18 15:10:49 2017 +0100

    ofz#3419 Null-dereference READ
    
    (cherry picked from commit 3e8ef0e1a40a14d1c2bdb5345ed59941c765356b)
    
     Conflicts:
            vcl/unx/generic/glyphs/freetype_glyphcache.cxx
    
    Change-Id: I32c5d5039034ac76262223e42a1f27d6f1b84cb5
    Reviewed-on: https://gerrit.libreoffice.org/50567
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index db656d318a23..9f88fc5480f3 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -947,7 +947,9 @@ void ServerFont::InitGlyphData( sal_GlyphId aGlyphId, GlyphData& rGD ) const
     rGD.SetCharWidth( nCharWidth );
 
     FT_Glyph pGlyphFT;
-    FT_Get_Glyph( maFaceFT->glyph, &pGlyphFT );
+    rc = FT_Get_Glyph(maFaceFT->glyph, &pGlyphFT);
+    if (rc != FT_Err_Ok)
+        return;
 
     ApplyGlyphTransform( nGlyphFlags, pGlyphFT, false );
     rGD.SetDelta( (pGlyphFT->advance.x + 0x8000) >> 16, -((pGlyphFT->advance.y + 0x8000) >> 16) );


More information about the Libreoffice-commits mailing list