Browse Source

avcodec/aacdec_template: Check samplerate

Fixes: signed integer overflow: 2 * 1881153568 cannot be represented in type 'int'
Fixes: 17996/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5687126468853760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3
Michael Niedermayer 6 years ago
parent
commit
7730bacb41
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/aacdec_template.c

+ 3
- 0
libavcodec/aacdec_template.c View File

@@ -1157,6 +1157,9 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
AACContext *ac = avctx->priv_data;
int ret;

if (avctx->sample_rate > 96000)
return AVERROR_INVALIDDATA;

ret = ff_thread_once(&aac_table_init, &aac_static_table_init);
if (ret != 0)
return AVERROR_UNKNOWN;


Loading…
Cancel
Save