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

Unified Diff: src/effects/SkBicubicImageFilter.cpp

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Adapting code to sk_once changes Created 7 years, 2 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 | « src/core/SkValidationUtils.h ('k') | src/effects/SkBlurImageFilter.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 02e706f3552cfb9c27cc081b3bb374f428d9deea..778df3fd4f50356759b663fbff03d2177c54c5b4 100644
--- a/src/effects/SkBicubicImageFilter.cpp
+++ b/src/effects/SkBicubicImageFilter.cpp
@@ -45,6 +45,10 @@ SkBicubicImageFilter::SkBicubicImageFilter(SkFlattenableReadBuffer& buffer) : IN
SkASSERT(readSize == 16);
fScale.fWidth = buffer.readScalar();
fScale.fHeight = buffer.readScalar();
+ buffer.validate(SkScalarIsFinite(fScale.fWidth) &&
+ SkScalarIsFinite(fScale.fHeight) &&
+ (fScale.fWidth >= 0) &&
+ (fScale.fHeight >= 0));
}
void SkBicubicImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {
« no previous file with comments | « src/core/SkValidationUtils.h ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698