From 4a1e5dbade4bab55f39bd368480dcca9a11e4b38 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 9 Jul 2015 09:30:42 +0200 Subject: Better handling of invalid font tables Specifically when reading files with broken cmap tables, we could get some undeterministic results. We handle this more gracefully by verifying that the offsets are sane and bailing out early if not. This replaces the current pattern throughout the font engine for consistency. Change-Id: I507bba49c0be634afca77d1eb3d199a427451bee Reviewed-by: Simon Hausmann Reviewed-by: Thiago Macieira --- src/plugins/platforms/windows/qwindowsfontengine.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms/windows/qwindowsfontengine.h') diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h index 02bc4008d1..c0dda6efca 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.h +++ b/src/plugins/platforms/windows/qwindowsfontengine.h @@ -147,6 +147,7 @@ private: TEXTMETRIC tm; int lw; const unsigned char *cmap; + int cmapSize; QByteArray cmapTable; mutable qreal lbearing; mutable qreal rbearing; -- cgit v1.2.3