diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-06-28 20:02:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-07-08 09:54:24 +0200 |
commit | 17209e48e28d6c05c6fa78ec7630c368a6201fe8 (patch) | |
tree | e594106ae98f39e15025d3ca6e7c684a81e9078a /libavcodec/tta.c | |
parent | 936ca7f1012ebb52233cc0a5acad3febfdbe9ec3 (diff) | |
download | ffmpeg-17209e48e28d6c05c6fa78ec7630c368a6201fe8.tar.gz |
avcodec/tta: Limit decoder to 16 channels
libtta 2.3 has a limit of 6 channels, so 16 is substantially above the "official" already
Fixes: OOM
Fixes: 15249/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5643988125614080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r-- | libavcodec/tta.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c index c7702610b6..4d27fcd555 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -163,7 +163,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) s->data_length = get_bits_long(&gb, 32); skip_bits_long(&gb, 32); // CRC32 of header - if (s->channels == 0) { + if (s->channels == 0 || s->channels > 16) { av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n"); return AVERROR_INVALIDDATA; } else if (avctx->sample_rate == 0) { |