[FFmpeg-cvslog] avcodec/mlz: clear dict on allocation to ensure there are no uninitialized values

Michael Niedermayer git at videolan.org
Thu Sep 8 21:48:32 EEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Sep  8 19:46:27 2016 +0200| [2f7a12fab5a2ea17bd78b155e9af965669fb9b52] | committer: Michael Niedermayer

avcodec/mlz: clear dict on allocation to ensure there are no uninitialized values

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c
index 04b684d..acb0908 100644
--- a/libavcodec/mlz.c
+++ b/libavcodec/mlz.c
@@ -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;



More information about the ffmpeg-cvslog mailing list