[FFmpeg-devel] [PATCH 2/8] avcodec/hcadec: Check sample_rate
Michael Niedermayer
michael at niedermayer.cc
Fri Jun 20 03:32:49 EEST 2025
Fixes: AVERROR_BUG return
Fixes: 413997604/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5188382613635072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/hcadec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/hcadec.c b/libavcodec/hcadec.c
index 7780372cf3f..161044bfbcc 100644
--- a/libavcodec/hcadec.c
+++ b/libavcodec/hcadec.c
@@ -179,6 +179,9 @@ static void ath_init1(uint8_t *ath, int sample_rate)
static int ath_init(uint8_t *ath, int type, int sample_rate)
{
+ if (sample_rate <= 0)
+ return AVERROR_INVALIDDATA;
+
switch (type) {
case 0:
/* nothing to do */
--
2.49.0
More information about the ffmpeg-devel
mailing list