aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-28 21:47:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-28 22:08:49 +0100
commit55fa898969d10e2d47bba0613175bf57a86c5a41 (patch)
tree9f944295c894463b84cf80375940d1ec5e6476cd /libavcodec
parent833501657bed55efb29c731409490dc322bbf2d8 (diff)
downloadffmpeg-55fa898969d10e2d47bba0613175bf57a86c5a41.tar.gz
avcodec/jpeg2000dec: zero Jpeg2000QuantStyle structure before use in get_qcd()
Fixes: msan_uninit-mem_7f50b84aac30_6823_mjp2.mov Fixes use of uninitialized memory Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jpeg2000dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index d3e49a19e6..3195104ad7 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -540,6 +540,8 @@ static int get_qcd(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q,
Jpeg2000QuantStyle tmp;
int compno, ret;
+ memset(&tmp, 0, sizeof(tmp));
+
if ((ret = get_qcx(s, n, &tmp)) < 0)
return ret;
for (compno = 0; compno < s->ncomponents; compno++)