summaryrefslogtreecommitdiffstats
path: root/sample
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2015-11-30 15:04:59 -0800
committerRaph Levien <raph@google.com>2015-12-07 17:58:12 +0000
commit6299a6ba13906c695f7a4f6748f7bc5856a110e5 (patch)
tree3cfc5b953fddd4f30422cc176a3fd6956c3d0163 /sample
parentd5804e3937a961736e5cef0e8a70eacf91ee00bb (diff)
downloadandroid_frameworks_minikin-6299a6ba13906c695f7a4f6748f7bc5856a110e5.tar.gz
android_frameworks_minikin-6299a6ba13906c695f7a4f6748f7bc5856a110e5.tar.bz2
android_frameworks_minikin-6299a6ba13906c695f7a4f6748f7bc5856a110e5.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. Bug: 25645298 Change-Id: Id4716132041a6f4f1fbb73ec4e445391cf7d9616 (cherry picked from commit 183c9ec2800baa2ce099ee260c6cbc6121cf1274)
Diffstat (limited to 'sample')
0 files changed, 0 insertions, 0 deletions