avfilter/vf_colorconstancy: fix overreads in gauss array

Fixes #8250

(cherry picked from commit a7fd127970)
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Paul B Mahol 2019-10-12 11:07:54 +02:00 committed by James Almer
parent e06e89f627
commit 29f1cf0c0f
1 changed files with 2 additions and 2 deletions

View File

@ -280,7 +280,7 @@ static int slice_get_derivative(AVFilterContext* ctx, void* arg, int jobnr, int
dst[INDX2D(r, c, width)] = 0;
for (g = 0; g < filtersize; ++g) {
dst[INDX2D(r, c, width)] += GAUSS(src, r, c + GINDX(filtersize, g),
in_linesize, height, width, gauss[GINDX(filtersize, g)]);
in_linesize, height, width, gauss[g]);
}
}
}
@ -295,7 +295,7 @@ static int slice_get_derivative(AVFilterContext* ctx, void* arg, int jobnr, int
dst[INDX2D(r, c, width)] = 0;
for (g = 0; g < filtersize; ++g) {
dst[INDX2D(r, c, width)] += GAUSS(src, r + GINDX(filtersize, g), c,
width, height, width, gauss[GINDX(filtersize, g)]);
width, height, width, gauss[g]);
}
}
}