mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
qdm2: Check data block size for bytes to bits overflow.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
62271c4c9a
commit
dac56d9ce0
@ -1819,6 +1819,10 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
|
|||||||
extradata += 4;
|
extradata += 4;
|
||||||
|
|
||||||
s->checksum_size = AV_RB32(extradata);
|
s->checksum_size = AV_RB32(extradata);
|
||||||
|
if (s->checksum_size >= 1U << 28) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "data block size too large (%u)\n", s->checksum_size);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
s->fft_order = av_log2(s->fft_size) + 1;
|
s->fft_order = av_log2(s->fft_size) + 1;
|
||||||
s->fft_frame_size = 2 * s->fft_size; // complex has two floats
|
s->fft_frame_size = 2 * s->fft_size; // complex has two floats
|
||||||
|
Loading…
Reference in New Issue
Block a user