Commit 3ba58433 authored by Michael Niedermayer's avatar Michael Niedermayer

diracdec: check wavelet depth, prevent out of array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8c414534
......@@ -996,6 +996,10 @@ static int dirac_unpack_idwt_params(DiracContext *s)
s->lowdelay.quant[level][3] = svq3_get_ue_golomb(gb);
}
} else {
if (s->wavelet_depth > 4) {
av_log(s->avctx,AV_LOG_ERROR,"Mandatory custom low delay matrix missing for depth %d\n", s->wavelet_depth);
return AVERROR_INVALIDDATA;
}
/* default quantization matrix */
for (level = 0; level < s->wavelet_depth; level++)
for (i = 0; i < 4; i++) {
......
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