diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-23 18:05:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-23 18:06:54 +0200 |
commit | 09927f3eaa93e31dd90ab8ee66dc1ad867b3365f (patch) | |
tree | e4737a806764697eae79f9e58acb1083f8afbfbb /libavcodec | |
parent | 912ce9dd2080c5837285a471d750fa311e09b555 (diff) | |
download | ffmpeg-09927f3eaa93e31dd90ab8ee66dc1ad867b3365f.tar.gz |
jpeg2000: zero reslevel array on allocation
prevent use of uninitialized values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/jpeg2000.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c index dc3311052e..77bf34e610 100644 --- a/libavcodec/jpeg2000.c +++ b/libavcodec/jpeg2000.c @@ -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 */ |