Fixing crash found by fuzzer
A previous fix only partially fixed this issue by adding validation on some inputs of SkImageInfo. If anything invalid is detected in SkImageInfo, unfortunately, this can cause getSafeSize() to do an illegal memory access while calling bytesPerPixel(), which could have a bad color type at this point.
A possible fix is to simply make sure we are in a valid state before calling getSafeSize().
BUG=329254
R=reed@google.com, mtklein@google.com, bsalomon@google.com, sugoi@google.com
Author: sugoi@chromium.org
Review URL: https://codereview.chromium.org/107003006
git-svn-id: http://skia.googlecode.com/svn/trunk@12844 2bbb7eff-a529-9590-31e7-b0007b416f81
1 file changed