Commit ccf4ab8c authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_edgedetect: check if height is big enough

Fixes #8260
parent 4f4334bc
......@@ -150,6 +150,7 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h,
int i, j;
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
if (h > 1)
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
for (j = 2; j < h - 2; j++) {
dst[0] = src[0];
......@@ -180,7 +181,9 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h,
dst += dst_linesize;
src += src_linesize;
}
if (h > 2)
memcpy(dst, src, w); dst += dst_linesize; src += src_linesize;
if (h > 3)
memcpy(dst, src, w);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment