1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-05 18:01:59 +02:00

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-09-08 19:46:27 +02:00
parent f2192e0f03
commit 2f7a12fab5

View File

@ -21,7 +21,7 @@
#include "mlz.h" #include "mlz.h"
av_cold void ff_mlz_init_dict(void* context, MLZ *mlz) { 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->flush_code = FLUSH_CODE;
mlz->current_dic_index_max = DIC_INDEX_INIT; mlz->current_dic_index_max = DIC_INDEX_INIT;