[FFmpeg-cvslog] avcodec/huffman: check if map was allocated too

Paul B Mahol git at videolan.org
Tue Feb 10 10:39:31 CET 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Feb  9 13:18:24 2015 +0000| [fd6768a4b8e2ce9e25a447aec9194b2bcdd1ac35] | committer: Paul B Mahol

avcodec/huffman: check if map was allocated too

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd6768a4b8e2ce9e25a447aec9194b2bcdd1ac35
---

 libavcodec/huffman.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/huffman.c b/libavcodec/huffman.c
index 2866eef..46a0cd7 100644
--- a/libavcodec/huffman.c
+++ b/libavcodec/huffman.c
@@ -62,7 +62,7 @@ int ff_huff_gen_len_table(uint8_t *dst, const uint64_t *stats, int stats_size, i
     int size = 0;
     int ret = 0;
 
-    if (!h || !up || !len) {
+    if (!h || !up || !len || !map) {
         ret = AVERROR(ENOMEM);
         goto end;
     }



More information about the ffmpeg-cvslog mailing list