vcl/win/gdi/salfont.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit c3b7c4d3ec6edb5db774d5352222b77239175f96 Author: Julien Nabet <serval2...@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 <c...@libreoffice.org> Reviewed-by: Julien Nabet <serval2...@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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits