avcodec/mlz: clear dict on allocation to ensure there are no uninitialized values
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 8 Sep 2016 17:46:27 +0000 (19:46 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 8 Sep 2016 18:31:15 +0000 (20:31 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mlz.c

index 04b684d..acb0908 100644 (file)
@@ -21,7 +21,7 @@
 #include "mlz.h"
 
 av_cold void ff_mlz_init_dict(void* context, MLZ *mlz) {
-    mlz->dict = av_malloc_array(TABLE_SIZE, sizeof(*mlz->dict));
+    mlz->dict = av_mallocz_array(TABLE_SIZE, sizeof(*mlz->dict));
 
     mlz->flush_code            = FLUSH_CODE;
     mlz->current_dic_index_max = DIC_INDEX_INIT;