avcodec/huffman: check if map was allocated too
authorPaul B Mahol <onemda@gmail.com>
Mon, 9 Feb 2015 13:18:24 +0000 (13:18 +0000)
committerPaul B Mahol <onemda@gmail.com>
Tue, 10 Feb 2015 09:35:23 +0000 (09:35 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/huffman.c

index 2866eef..46a0cd7 100644 (file)
@@ -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;
     }