Reject fonts with invalid ranges in cmap

A corrupt or malicious font may have a negative size in its cmap
range, which in turn could lead to memory corruption. This patch
detects the case and rejects the font, and also includes an assertion
in the sparse bit set implementation if we missed any such case.

External issue:

Bug: 26413177
Change-Id: Icc0c80e4ef389abba0964495b89aa0fae3e9f4b2
(cherry picked from commit ca8ac8acdad662230ae37998c6c4091bb39402b6)
2 files changed
tree: 9e639f4e9b93dc3249a42c6c2e7f638d9bf9cce5
  1. app/
  2. doc/
  3. include/
  4. libs/
  5. sample/
  6. tools/