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 { |