Commit fcd19d6c authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: Zero code and quant style

This prevents future frames from using half initialized/inconsistent
structures
Fixes assertion failure
Fixes Ticket2897
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1c71f185
...@@ -1364,6 +1364,8 @@ static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s) ...@@ -1364,6 +1364,8 @@ static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s)
} }
} }
av_freep(&s->tile); av_freep(&s->tile);
memset(s->codsty, 0, sizeof(s->codsty));
memset(s->qntsty, 0, sizeof(s->qntsty));
s->numXtiles = s->numYtiles = 0; s->numXtiles = s->numYtiles = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment