mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
diracdec: check lowdelay bytes.
Fixes division by zero Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a30165c4a8
commit
efe1ba7201
@ -980,6 +980,11 @@ static int dirac_unpack_idwt_params(DiracContext *s)
|
||||
s->lowdelay.bytes.num = svq3_get_ue_golomb(gb);
|
||||
s->lowdelay.bytes.den = svq3_get_ue_golomb(gb);
|
||||
|
||||
if (s->lowdelay.bytes.den <= 0) {
|
||||
av_log(s->avctx,AV_LOG_ERROR,"Invalid lowdelay.bytes.den\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* [DIRAC_STD] 11.3.5 Quantisation matrices (low-delay syntax). quant_matrix() */
|
||||
if (get_bits1(gb)) {
|
||||
av_log(s->avctx,AV_LOG_DEBUG,"Low Delay: Has Custom Quantization Matrix!\n");
|
||||
|
Loading…
Reference in New Issue
Block a user