aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar sugoi <sugoi@chromium.org>2015-01-28 13:15:32 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-28 13:15:32 -0800
commit6af314724f51ad79a640844536c667bb83de5690 (patch)
treeb1b8471429d0ac37cde935e098a1ddcfe3292b93 /src
parent5a3d92fca17b9d4d7763c6d24c72c74f7682881f (diff)
Fixed clusterfuzz issue
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBitmap.cpp3
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;