diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-02 00:48:11 +0000 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-10-10 21:37:36 +0200 |
commit | 1b1182ce97db7a97914bb7713eba66fee5d93937 (patch) | |
tree | 348eff51072a65577665d76f5aaa5b3bc090d4d8 /libavcodec | |
parent | 79964745b3ed5a700f4f0dda56c7360497328c88 (diff) | |
download | ffmpeg-1b1182ce97db7a97914bb7713eba66fee5d93937.tar.gz |
4xm: prevent NULL dereference with invalid huffman table
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/4xm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index d428f53275..21bde52fee 100644 --- a/libavcodec/4xm.c +++ b/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; } |