diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-02 00:48:11 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-03-18 17:50:41 +0100 |
commit | 6b011631e92073b68a1f67c8769946db1c28d623 (patch) | |
tree | 4e371c696a61b49934fd52bcb6b374b3d9cc1f1b | |
parent | 5ab326d7db3fd3feba570188b49dd4cd69105e9c (diff) | |
download | ffmpeg-6b011631e92073b68a1f67c8769946db1c28d623.tar.gz |
4xm: prevent NULL dereference with invalid huffman table
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 1b1182ce97db7a97914bb7713eba66fee5d93937)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-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 e6ec6a6d23..8f9ab241ca 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; } |