From 319f4165f37ff7c4463af9e7cfc509f4dd5c6594 Mon Sep 17 00:00:00 2001 From: ziyugao Date: Thu, 23 May 2024 02:47:55 +0000 Subject: [PATCH] CVE-2023-51794 Signed-off-by: ziyugao --- libavfilter/af_stereowiden.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/af_stereowiden.c b/libavfilter/af_stereowiden.c index a91ea03957..ac4ec6fd37 100644 --- a/libavfilter/af_stereowiden.c +++ b/libavfilter/af_stereowiden.c @@ -74,6 +74,8 @@ static int config_input(AVFilterLink *inlink) s->length = s->delay * inlink->sample_rate / 1000; s->length *= 2; + if (s->length == 0) + return AVERROR(EINVAL); s->buffer = av_calloc(s->length, sizeof(*s->buffer)); if (!s->buffer) return AVERROR(ENOMEM);