[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)
committerUtkarsh Gupta <utkarsh@debian.org>
Mon, 24 Jan 2022 10:55:59 +0000 (10:55 +0000)
commitfd539a7e03063c865cb7ba7c320e991c3992a578
treedfac5e2f486554ddf01bcdcfe3874d2413f58acc
parent52907e396c90cddbbe559883705bc138fff26a6e
[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