Commit 13c56e9a authored by Michael Niedermayer's avatar Michael Niedermayer

4xm: check for invalid zero ac coeffs

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6d6eabd3
...@@ -525,7 +525,12 @@ static int decode_i_block(FourXContext *f, int16_t *block) ...@@ -525,7 +525,12 @@ static int decode_i_block(FourXContext *f, int16_t *block)
if (code == 0xf0) { if (code == 0xf0) {
i += 16; i += 16;
} else { } else {
level = get_xbits(&f->gb, code & 0xf); if (code & 0xf) {
level = get_xbits(&f->gb, code & 0xf);
} else {
av_log(f->avctx, AV_LOG_ERROR, "0 coeff\n");
return AVERROR_INVALIDDATA;
}
i += code >> 4; i += code >> 4;
if (i >= 64) { if (i >= 64) {
av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i); av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", 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