Commit 880579a7 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/aacdec: Check if we run out of input in read_stream_mux_config()

Fixes: Infinite loop
Fixes: 16920/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5653421289373696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3dce4d03)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent e15fd9bc
...@@ -403,6 +403,8 @@ static int read_stream_mux_config(struct LATMContext *latmctx, ...@@ -403,6 +403,8 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
} else { } else {
int esc; int esc;
do { do {
if (get_bits_left(gb) < 9)
return AVERROR_INVALIDDATA;
esc = get_bits(gb, 1); esc = get_bits(gb, 1);
skip_bits(gb, 8); skip_bits(gb, 8);
} while (esc); } while (esc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment