diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-01 12:01:30 +0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-07-02 22:05:47 +0400 |
commit | 09d5929f3721613fbb9ac9e74265c89c70df2ce0 (patch) | |
tree | 250ec71d952db5a265cdd74f60635d236a0c652a /libavcodec | |
parent | aa16bbaf9bcaef880f70c834d46cb51cf823722f (diff) |
jpeg2000: Do not crash on NULL node in tag_tree_decode
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index ac44a29ff1..172314f40a 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -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; |