1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

jpeg2000: zero reslevel array on allocation

prevent use of uninitialized values

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-08-23 18:05:53 +02:00
parent 912ce9dd20
commit 09927f3eaa

View File

@@ -224,7 +224,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
if (!comp->i_data) if (!comp->i_data)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
comp->reslevel = av_malloc_array(codsty->nreslevels, sizeof(*comp->reslevel)); comp->reslevel = av_calloc(codsty->nreslevels, sizeof(*comp->reslevel));
if (!comp->reslevel) if (!comp->reslevel)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
/* LOOP on resolution levels */ /* LOOP on resolution levels */