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

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 23548034: Follow up to serialization validation code (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
Index: src/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 5d5f29058b705a704053d3c1873a81286e1f2cf9..b44505d556c22948a6f2b89a5976a042addbce51 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -24,9 +24,7 @@ SkMorphologyImageFilter::SkMorphologyImageFilter(SkFlattenableReadBuffer& buffer
: INHERITED(buffer) {
fRadius.fWidth = buffer.readInt();
fRadius.fHeight = buffer.readInt();
- buffer.validate(SkScalarIsFinite(SkIntToScalar(fRadius.fWidth)) &&
- SkScalarIsFinite(SkIntToScalar(fRadius.fHeight)) &&
- (fRadius.fWidth >= 0) &&
+ buffer.validate((fRadius.fWidth >= 0) &&
(fRadius.fHeight >= 0));
}

Powered by Google App Engine
This is Rietveld 408576698