Commit b44925ae authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Luca Barbato

jpeg2000: Initialize code blocks structures in precincts to 0

Prevent use of uninitialized memory / valgrind failure.

Found-by: ubitux
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent cf04af20
......@@ -416,7 +416,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
if (!prec->zerobits)
return AVERROR(ENOMEM);
prec->cblk = av_malloc_array(prec->nb_codeblocks_width *
prec->cblk = av_mallocz_array(prec->nb_codeblocks_width *
prec->nb_codeblocks_height,
sizeof(*prec->cblk));
if (!prec->cblk)
......
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