Commit e1ba29c7 authored by Michael Niedermayer's avatar Michael Niedermayer

4xm: check if there are bits left in decode_i_block()

Fixed Ticket753
Bug Found by: Diana Elena Muscalu
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 76b9a096
......@@ -459,6 +459,11 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
static int decode_i_block(FourXContext *f, DCTELEM *block){
int code, i, j, level, val;
if(get_bits_left(&f->gb) < 2){
av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb));
return -1;
}
/* DC coef */
val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
if (val>>4){
......
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