[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)
committerRoberto C. Sánchez <roberto@debian.org>
Tue, 22 Aug 2023 13:42:24 +0000 (14:42 +0100)
commitc8f6f33273d3a82b14db7ca9353ba86ee80aa338
tree3739b176cfb0f76a17214764da0b1744585a9692
parentb2e4a118d713d1ce91d6a302b52b891977f1a1fa
[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