diff --git a/libavfilter/vf_dejudder.c b/libavfilter/vf_dejudder.c index 1d96c394e5..ab525b666c 100644 --- a/libavfilter/vf_dejudder.c +++ b/libavfilter/vf_dejudder.c @@ -95,7 +95,7 @@ static av_cold int dejudder_init(AVFilterContext *ctx) { DejudderContext *dj = ctx->priv; - dj->ringbuff = av_mallocz(sizeof(*dj->ringbuff) * (dj->cycle+2)); + dj->ringbuff = av_mallocz_array(dj->cycle+2, sizeof(*dj->ringbuff)); if (!dj->ringbuff) return AVERROR(ENOMEM);