Index: src/effects/SkMatrixConvolutionImageFilter.cpp |
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp |
index 8ae837755fe9c8924c07313d1694732ab454fcfd..89e113b8cea9867fb70c99dfcbbe9db532b4718f 100644 |
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp |
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp |
@@ -86,7 +86,9 @@ SkMatrixConvolutionImageFilter::SkMatrixConvolutionImageFilter(SkReadBuffer& buf |
buffer.validate((fKernel != 0) && |
SkScalarIsFinite(fGain) && |
SkScalarIsFinite(fBias) && |
- tile_mode_is_valid(fTileMode)); |
+ tile_mode_is_valid(fTileMode) && |
+ (fKernelOffset.fX >= 0) && (fKernelOffset.fX < fKernelSize.fWidth) && |
+ (fKernelOffset.fY >= 0) && (fKernelOffset.fY < fKernelSize.fHeight)); |
} |
void SkMatrixConvolutionImageFilter::flatten(SkWriteBuffer& buffer) const { |