Commit 09927f3e authored by Michael Niedermayer's avatar Michael Niedermayer

jpeg2000: zero reslevel array on allocation

prevent use of uninitialized values
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 912ce9dd
......@@ -224,7 +224,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
if (!comp->i_data)
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)
return AVERROR(ENOMEM);
/* LOOP on resolution levels */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment