mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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 371e5dbb3f61fbfb653eed4fa2e452f8978419ff)