Browse Source

avcodec/atrac9dec: Check block_align

Fixes: Infinite loop
Fixes: 16260/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5676365617037312
Fixes: 16260/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5768093879500800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dead949a1f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.1.5
Michael Niedermayer 6 years ago
parent
commit
14616c63df
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/atrac9dec.c

+ 5
- 0
libavcodec/atrac9dec.c View File

@@ -842,6 +842,11 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx)

av_lfg_init(&s->lfg, 0xFBADF00D);

if (avctx->block_align <= 0) {
av_log(avctx, AV_LOG_ERROR, "Invalid block align\n");
return AVERROR_INVALIDDATA;
}

if (avctx->extradata_size != 12) {
av_log(avctx, AV_LOG_ERROR, "Invalid extradata length!\n");
return AVERROR_INVALIDDATA;


Loading…
Cancel
Save