4xm: prevent NULL dereference with invalid huffman table

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
This commit is contained in:
Laurent Aimar 2011-10-02 00:48:11 +00:00 committed by Janne Grunau
parent 79964745b3
commit 1b1182ce97

View File

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