PR #25047 opened by Marvin Scholz (ePirat) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25047 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25047.patch
Nellymoser requires the demuxer to provide the sample rate, so reject invalid ones. >From 0054414643221926b994060d7068ddfadf0253f3 Mon Sep 17 00:00:00 2001 From: Marvin Scholz <[email protected]> Date: Tue, 13 Oct 2026 21:25:13 +0000 Subject: [PATCH] avcodec: nellymoser: reject invalid sample rate Signed-off-by: Marvin Scholz <[email protected]> --- libavcodec/nellymoserdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 7037d6b0ba..04b0c01afe 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -121,6 +121,11 @@ static av_cold int decode_init(AVCodecContext * avctx) float scale = 1.0f; NellyMoserDecodeContext *s = avctx->priv_data; + if (avctx->sample_rate <= 0) { + av_log(avctx, AV_LOG_ERROR, "Sample rate %d is invalid\n", avctx->sample_rate); + return AVERROR(EINVAL); + } + s->avctx = avctx; s->imdct_out = s->imdct_buf[0]; s->imdct_prev = s->imdct_buf[1]; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
