diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c index 95ba43be42..5b47f76169 100644 --- a/libavfilter/vf_owdenoise.c +++ b/libavfilter/vf_owdenoise.c @@ -293,7 +293,7 @@ static int config_input(AVFilterLink *inlink) s->linesize = FFALIGN(inlink->w, 16); for (j = 0; j < 4; j++) { for (i = 0; i <= s->depth; i++) { - s->plane[i][j] = av_malloc(s->linesize * h * sizeof(s->plane[0][0][0])); + s->plane[i][j] = av_malloc_array(s->linesize, h * sizeof(s->plane[0][0][0])); if (!s->plane[i][j]) return AVERROR(ENOMEM); }