Message ID | 20221029191353.2973-4-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 1dc8d82da910972d308aebc1ee722044f83b9ccc |
Headers | show |
Series | [FFmpeg-devel,1/4] avformat/replaygain: avoid undefined / negative abs | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Sat, Oct 29, 2022 at 09:13:53PM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: 52161/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-6440216563154944 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > --- > libavcodec/alsdec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) will apply [...]
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index eab382e74f..4605b2248f 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1660,7 +1660,8 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame) if (!sconf->mc_coding || ctx->js_switch) { int independent_bs = !sconf->joint_stereo; - + if (get_bits_left(gb) < 7*channels*ctx->num_blocks) + return AVERROR_INVALIDDATA; for (c = 0; c < channels; c++) { js_blocks[0] = 0; js_blocks[1] = 0;