[PATCH] Better handling of invalid font tables
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Fri, 10 Jul 2015 11:22:32 +0000 (13:22 +0200)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Mon, 14 Sep 2020 13:56:35 +0000 (14:56 +0100)
commit79576c60e5f683d6f7a99fa0a34e4f40e59bd830
treed89ff72be77ce99669afa9471be9a69739fd0fde
parent01be0c427f21c5d5b6cd71b741714b43a438c47c
[PATCH] 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.

This is a back-port of 4a1e5dbade4bab55f39bd368480dcca9a11e4b38
from Qt 5.

Change-Id: If4172b9ef0808801c8e27ffaad962535afe572ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Gbp-Pq: Name Better-handling-of-invalid-font-tables.patch
src/gui/text/qfontengine.cpp
src/gui/text/qfontengine_mac.mm
src/gui/text/qfontengine_mac_p.h
src/gui/text/qfontengine_p.h
src/gui/text/qfontengine_qpa.cpp
src/gui/text/qfontengine_qpf.cpp
src/gui/text/qfontengine_s60.cpp
src/gui/text/qfontengine_s60_p.h
src/gui/text/qfontengine_win.cpp
src/gui/text/qfontengine_win_p.h