diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-09-03 14:31:11 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-09-03 20:52:26 +0200 |
commit | c3b7c4d3ec6edb5db774d5352222b77239175f96 (patch) | |
tree | 79b8486718ccc9f67f1eaa977dd7b4ff3fc2627a | |
parent | 242688f3b4fc7228637837e0f4fec3da71ac2710 (diff) |
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@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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; } } |