Commit a5203d86 authored by Michael Niedermayer's avatar Michael Niedermayer

j2kdec: merge length==0 check from jpeg2000

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f67f2681
......@@ -795,6 +795,10 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
for (y = 0; y < height; y++)
memset(t1->data[y], 0, width * sizeof(**t1->data));
/* If code-block contains no compressed data: nothing to do. */
if (!cblk->length)
return 0;
for (y = 0; y < height+2; y++)
memset(t1->flags[y], 0, (width + 2)*sizeof(**t1->flags));
......
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