Index: src/effects/SkMorphologyImageFilter.cpp |
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp |
index d02e8cae6e536b5a66c3b1611e0c4ef1a44b56a1..08e0ab21b6fa5829febd49a2fdba738ead2a6deb 100644 |
--- a/src/effects/SkMorphologyImageFilter.cpp |
+++ b/src/effects/SkMorphologyImageFilter.cpp |
@@ -23,6 +23,8 @@ SkMorphologyImageFilter::SkMorphologyImageFilter(SkFlattenableReadBuffer& buffer |
: INHERITED(buffer) { |
fRadius.fWidth = buffer.readInt(); |
fRadius.fHeight = buffer.readInt(); |
+ buffer.validate((fRadius.fWidth >= 0) && |
+ (fRadius.fHeight >= 0)); |
} |
SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect) |