1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/jpeg2000: zero i/f_data

Fixes uninitialized use of variables

Fixes part of Ticket2921

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-13 20:26:11 +02:00
parent ede7602cba
commit e54f4510aa

View File

@ -215,12 +215,12 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
if (codsty->transform == FF_DWT97) {
comp->i_data = NULL;
comp->f_data = av_malloc_array(csize, sizeof(*comp->f_data));
comp->f_data = av_mallocz_array(csize, sizeof(*comp->f_data));
if (!comp->f_data)
return AVERROR(ENOMEM);
} else {
comp->f_data = NULL;
comp->i_data = av_malloc_array(csize, sizeof(*comp->i_data));
comp->i_data = av_mallocz_array(csize, sizeof(*comp->i_data));
if (!comp->i_data)
return AVERROR(ENOMEM);
}