diff options
author | sugoi <sugoi@chromium.org> | 2014-12-18 08:32:07 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-18 08:32:07 -0800 |
commit | 0908c64a1d63a46b1f78b1b4a32febc20769a92b (patch) | |
tree | 4c627d0c2d946da9d7a5481e5428c86a6843a677 | |
parent | 413a1eb45e0210748f126edd9e0639b905394bb7 (diff) | |
download | skia-0908c64a1d63a46b1f78b1b4a32febc20769a92b.tar.gz |
Merge SkMatrixConvolutionImageFilter fix to M40
Merging https://codereview.chromium.org/729583002/ to M40 as requested by the bug mentioned below.
BUG=433359
NOTRY=true
Review URL: https://codereview.chromium.org/803553004
-rw-r--r-- | src/effects/SkMatrixConvolutionImageFilter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp index ae29bcb01..cdcf66f69 100644 --- a/src/effects/SkMatrixConvolutionImageFilter.cpp +++ b/src/effects/SkMatrixConvolutionImageFilter.cpp @@ -67,6 +67,10 @@ SkMatrixConvolutionImageFilter* SkMatrixConvolutionImageFilter::Create( if (!kernel) { return NULL; } + if ((kernelOffset.fX < 0) || (kernelOffset.fX >= kernelSize.fWidth) || + (kernelOffset.fY < 0) || (kernelOffset.fY >= kernelSize.fHeight)) { + return NULL; + } return SkNEW_ARGS(SkMatrixConvolutionImageFilter, (kernelSize, kernel, gain, bias, kernelOffset, tileMode, convolveAlpha, input, cropRect, uniqueID)); |