Index: src/effects/SkMagnifierImageFilter.cpp |
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp |
index 8b16516f5a1ffa0f11730d06d274d76b084e2a49..7ac5249284177589d58a24da4c3b1bc7e0957c2f 100644 |
--- a/src/effects/SkMagnifierImageFilter.cpp |
+++ b/src/effects/SkMagnifierImageFilter.cpp |
@@ -9,6 +9,7 @@ |
#include "SkMagnifierImageFilter.h" |
#include "SkColorPriv.h" |
#include "SkFlattenableBuffers.h" |
+#include "SkValidationUtils.h" |
//////////////////////////////////////////////////////////////////////////////// |
#if SK_SUPPORT_GPU |
@@ -238,6 +239,8 @@ SkMagnifierImageFilter::SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer) |
float height = buffer.readScalar(); |
fSrcRect = SkRect::MakeXYWH(x, y, width, height); |
fInset = buffer.readScalar(); |
+ |
+ buffer.validate(SkIsValidRect(fSrcRect) && SkScalarIsFinite(fInset)); |
} |
// FIXME: implement single-input semantics |