diff options
author | sugoi <sugoi@chromium.org> | 2015-01-28 13:15:32 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-28 13:15:32 -0800 |
commit | 6af314724f51ad79a640844536c667bb83de5690 (patch) | |
tree | b1b8471429d0ac37cde935e098a1ddcfe3292b93 /src | |
parent | 5a3d92fca17b9d4d7763c6d24c72c74f7682881f (diff) |
Fixed clusterfuzz issue
BUG=448423
Review URL: https://codereview.chromium.org/881423002
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkBitmap.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index c962aea21a..e77bbbd4e5 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -1232,6 +1232,9 @@ bool SkBitmap::ReadRawPixels(SkReadBuffer* buffer, SkBitmap* bitmap) { SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewWithData(info, info.minRowBytes(), ctable.get(), data.get())); + if (!pr.get()) { + return false; + } bitmap->setInfo(pr->info()); bitmap->setPixelRef(pr, 0, 0); return true; |