[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - vcl/win

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


 vcl/win/gdi/salfont.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 70f8b4b9b0330b9150c5d6c3f066834f20023578
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 5 13:06:20 2017 +0100

    Resolves: tdf#112180: avoid crash with specific ttf
    
    Change-Id: I8cde147279173bffec0c991eb7676f5d4641138d
    Reviewed-on: https://gerrit.libreoffice.org/41935
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit f263692de96ac68e73eeb953b7e92a18d149f30e)
    Reviewed-on: https://gerrit.libreoffice.org/42507

diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 8c120c00881f..cb9899a303af 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -90,9 +90,9 @@ RawFontData::RawFontData( HDC hDC, DWORD nTableTag )
 {
     // get required size in bytes
     mnByteCount = ::GetFontData( hDC, nTableTag, 0, nullptr, 0 );
-    if( mnByteCount == GDI_ERROR )
-        return;
-    else if( !mnByteCount )
+    if (mnByteCount == GDI_ERROR)
+        mnByteCount = 0;
+    if (!mnByteCount)
         return;
 
     // allocate the array


More information about the Libreoffice-commits mailing list