Handle bad ICO data better.
scroggo authored
Cherry-pick from 57ad4937 in Skia:

Interpret size and offset as size_t, as they should be. When read
as int, they could be negative values. If they are negative (rather
than positive and very large), they will not allow us to fail the
length test, resulting in trying to read uninitialized memory.

BUG=b/16010240
R=halcanary@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/374413005

BUG:16010240
Change-Id: I70ff31c1d06ea2705700bb9f5c767a100b946d09
38fb2fd3
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://sites.google.com/site/skiadocs/home