PR #23290 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23290
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23290.patch

Fixes: AVERROR_BUG

Fixes: 
493055111/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MISC4_fuzzer-5752676962074624
Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>


>From 55c7f405e52d5cce82cec648ccba5babe4a29537 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Sun, 31 May 2026 00:13:59 +0200
Subject: [PATCH] avcodec/misc4: reject invalid sample rate

Fixes: AVERROR_BUG

Fixes: 
493055111/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MISC4_fuzzer-5752676962074624
Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/misc4.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/misc4.c b/libavcodec/misc4.c
index d92c671d1d..af075882f5 100644
--- a/libavcodec/misc4.c
+++ b/libavcodec/misc4.c
@@ -57,6 +57,9 @@ static av_cold int misc4_init(AVCodecContext *avctx)
 {
     MISC4Context *s = avctx->priv_data;
 
+    if (avctx->sample_rate <= 0)
+        return AVERROR_INVALIDDATA;
+
     avctx->sample_fmt = AV_SAMPLE_FMT_S16;
     switch (avctx->sample_rate) {
     case 8000:
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to