[Libreoffice-commits] core.git: vcl/win
Julien Nabet
serval2412 at yahoo.fr
Sun Sep 3 18:52:48 UTC 2017
vcl/win/gdi/salfont.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit c3b7c4d3ec6edb5db774d5352222b77239175f96
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Sep 3 14:31:11 2017 +0200
tdf#112180: avoid crash with specific ttf
by synchronizing announced size of data (mnByteCount)
with the real size of data (mpRawBytes)
Change-Id: I973bec9deb1150b630d1df32c89b33c253e4b3d2
Reviewed-on: https://gerrit.libreoffice.org/41860
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 360de5368aaa..dc6d2c51692b 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -126,6 +126,9 @@ RawFontData::RawFontData( HDC hDC, DWORD nTableTag )
if( nRawDataOfs != mnByteCount )
{
mpRawBytes.reset();
+ // mnByteCount must correspond to mpRawBytes length
+ SAL_WARN( "vcl", "Raw data of font is incomplete: " << nRawDataOfs << " byte(s) found whereas " << mnByteCount << " byte(s) expected!" );
+ mnByteCount = 0;
}
}
More information about the Libreoffice-commits
mailing list