jpeg2000: Do not crash on NULL node in tag_tree_decode

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Michael Niedermayer 2013-07-01 10:01:30 +02:00 committed by Luca Barbato
parent aa16bbaf9b
commit 09d5929f37

View File

@ -119,6 +119,9 @@ static int tag_tree_decode(Jpeg2000DecoderContext *s, Jpeg2000TgtNode *node,
Jpeg2000TgtNode *stack[30];
int sp = -1, curval = 0;
if (!node)
return AVERROR_INVALIDDATA;
while (node && !node->vis) {
stack[++sp] = node;
node = node->parent;