ICO: Prevent calling 'new' with large values

numImages is read from untrusted data, and as an unsigned short could
be up to 65,536. Avoid calling new with this number, which could result
in a crash if it pushes the device over the memory limit.

Change-Id: Ifff9e0ac6ade2b3d8584af656ea7d2f9eb4998e2
Reviewed-on: https://skia-review.googlesource.com/21269
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
1 file changed