mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
833501657b
commit
55fa898969
@ -540,6 +540,8 @@ static int get_qcd(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q,
|
|||||||
Jpeg2000QuantStyle tmp;
|
Jpeg2000QuantStyle tmp;
|
||||||
int compno, ret;
|
int compno, ret;
|
||||||
|
|
||||||
|
memset(&tmp, 0, sizeof(tmp));
|
||||||
|
|
||||||
if ((ret = get_qcx(s, n, &tmp)) < 0)
|
if ((ret = get_qcx(s, n, &tmp)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
for (compno = 0; compno < s->ncomponents; compno++)
|
for (compno = 0; compno < s->ncomponents; compno++)
|
||||||
|
Loading…
Reference in New Issue
Block a user