Added missing validation
BUG=433359 Review URL: https://codereview.chromium.org/729583002
This commit is contained in:
parent
0a81f1ee0e
commit
1379b87ae4
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user