4xm: prevent NULL dereference with invalid huffman table

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
pull/2/head
Laurent Aimar 13 years ago committed by Janne Grunau
parent 79964745b3
commit 1b1182ce97
  1. 7
      libavcodec/4xm.c

@ -602,9 +602,10 @@ static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const
len_tab[j]= len;
}
init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
len_tab , 1, 1,
bits_tab, 4, 4, 0);
if (init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
len_tab , 1, 1,
bits_tab, 4, 4, 0))
return NULL;
return ptr;
}

Loading…
Cancel
Save