Skip to content

Commit

Permalink
avcodec/jpeg2000: zero i/f_data
Browse files Browse the repository at this point in the history
Fixes uninitialized use of variables

Fixes part of Ticket2921

Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Oct 13, 2013
1 parent ede7602 commit e54f451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavcodec/jpeg2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e54f451

Please sign in to comment.