Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: src/effects/SkBicubicImageFilter.cpp

Issue 23533042: Fixed issues found by fuzzer (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkLightingImageFilter.h ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBicubicImageFilter.cpp
diff --git a/src/effects/SkBicubicImageFilter.cpp b/src/effects/SkBicubicImageFilter.cpp
index 0ffcde6e2e13d4a7898a4b603297e1bedc079875..02e706f3552cfb9c27cc081b3bb374f428d9deea 100644
--- a/src/effects/SkBicubicImageFilter.cpp
+++ b/src/effects/SkBicubicImageFilter.cpp
@@ -98,6 +98,9 @@ bool SkBicubicImageFilter::onFilterImage(Proxy* proxy,
SkScalarMul(SkIntToScalar(src.height()), fScale.fHeight));
SkIRect dstIRect;
dstRect.roundOut(&dstIRect);
+ if (dstIRect.isEmpty()) {
+ return false;
+ }
result->setConfig(src.config(), dstIRect.width(), dstIRect.height());
result->allocPixels();
if (!result->getPixels()) {
« no previous file with comments | « include/effects/SkLightingImageFilter.h ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698