Commit efe1ba72 authored by Michael Niedermayer's avatar Michael Niedermayer

diracdec: check lowdelay bytes.

Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a30165c4
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment