mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 03:20:00 +01:00
avcodec/alsdec: Check that input space for header exists in read_diff_float_data()
Fixes: Timeout (21sec -> 8sec)
Fixes: 17832/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5737092172218368
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 09581f7923)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1481,6 +1481,9 @@ static int read_diff_float_data(ALSDecContext *ctx, unsigned int ra_frame) {
|
|||||||
ff_mlz_flush_dict(ctx->mlz);
|
ff_mlz_flush_dict(ctx->mlz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (avctx->channels * 8 > get_bits_left(gb))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
for (c = 0; c < avctx->channels; ++c) {
|
for (c = 0; c < avctx->channels; ++c) {
|
||||||
if (use_acf) {
|
if (use_acf) {
|
||||||
//acf_flag
|
//acf_flag
|
||||||
|
|||||||
Reference in New Issue
Block a user