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 <michael@niedermayer.cc>
This commit is contained in:
committed by
michaelni
parent
0ab097fb34
commit
32eb07bb83
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user