[FFmpeg-cvslog] Prevent NULL dereference when the huffman table is invalid in the 4xm decoder .
Laurent Aimar
git at videolan.org
Sun Oct 2 05:59:52 CEST 2011
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Sun Oct 2 00:38:28 2011 +0200| [535112b3658c21d1f9c4d2b44689342a32ff6eea] | committer: Michael Niedermayer
Prevent NULL dereference when the huffman table is invalid in the 4xm decoder.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 4a8ff0636d67c6df059f2ae2df49ad1181de14ca)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=535112b3658c21d1f9c4d2b44689342a32ff6eea
---
libavcodec/4xm.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index d89b494..1ec64ae 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -601,9 +601,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;
}
More information about the ffmpeg-cvslog
mailing list