Browse Source

jpeg2000: Do not crash on NULL node in tag_tree_decode

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n2.0
Michael Niedermayer Luca Barbato 12 years ago
parent
commit
09d5929f37
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/jpeg2000dec.c

+ 3
- 0
libavcodec/jpeg2000dec.c 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;


Loading…
Cancel
Save