You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/takdec: Fix overflow with large sample rates
Fixes: signed integer overflow: 2147483647 + 511 cannot be represented in type 'int' Fixes: 17899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5719753322135552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -176,8 +176,8 @@ static void set_sample_rate_params(AVCodecContext *avctx)
|
|||||||
} else {
|
} else {
|
||||||
shift = 0;
|
shift = 0;
|
||||||
}
|
}
|
||||||
s->uval = FFALIGN(avctx->sample_rate + 511 >> 9, 4) << shift;
|
s->uval = FFALIGN(avctx->sample_rate + 511LL >> 9, 4) << shift;
|
||||||
s->subframe_scale = FFALIGN(avctx->sample_rate + 511 >> 9, 4) << 1;
|
s->subframe_scale = FFALIGN(avctx->sample_rate + 511LL >> 9, 4) << 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_cold int tak_decode_init(AVCodecContext *avctx)
|
static av_cold int tak_decode_init(AVCodecContext *avctx)
|
||||||
|
Reference in New Issue
Block a user