summaryrefslogtreecommitdiffstats
path: root/libs/minikin/FontCollection.cpp
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2015-11-30 15:04:59 -0800
committerJessica Wagantall <jwagantall@cyngn.com>2016-01-05 15:00:23 -0800
commit7f7784e9f17837c36ac27f4ba5eccfdf55429385 (patch)
tree7bcf2ce6b7cd2cf91c8703780bfba13274f55b80 /libs/minikin/FontCollection.cpp
parenteff9f1e9373a61d65217fdfec3702d376a793978 (diff)
downloadandroid_frameworks_minikin-7f7784e9f17837c36ac27f4ba5eccfdf55429385.tar.gz
android_frameworks_minikin-7f7784e9f17837c36ac27f4ba5eccfdf55429385.tar.bz2
android_frameworks_minikin-7f7784e9f17837c36ac27f4ba5eccfdf55429385.zip
Avoid integer overflows in parsing fonts
A malformed TTF can cause size calculations to overflow. This patch checks the maximum reasonable value so that the total size fits in 32 bits. It also adds some explicit casting to avoid possible technical undefined behavior when parsing sized unsigned values. Ticket: CYNGNOS-1404 Bug: 25645298 Change-Id: Id4716132041a6f4f1fbb73ec4e445391cf7d9616 (cherry picked from commit 183c9ec2800baa2ce099ee260c6cbc6121cf1274)
Diffstat (limited to 'libs/minikin/FontCollection.cpp')
0 files changed, 0 insertions, 0 deletions