Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-10-02 02:38:28 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-10-02 05:24:16 +0400
commit4a8ff0636d67c6df059f2ae2df49ad1181de14ca (patch)
treeffa5ad118d25fe3565e7cd1e7786ca484d77e5d4 /libavcodec/4xm.c
parenta1876e0072aa0c69f037e0cafaca1a54bf2e189b (diff)
Prevent NULL dereference when the huffman table is invalid in the 4xm decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index cf98e91766..f1b6a71eb0 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;
}