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)
committerFelix Geyer <fgeyer@debian.org>
Sun, 14 Jul 2019 10:19:27 +0000 (11:19 +0100)
commit3d00ee9a8fca015fb6665387cafc4828224e26a3
treedaddb36efde205805340c04f4d64063535af566d
parent1839f17c74f5d50fb1e018c528cda1c4c817dbd6
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