aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-14 22:00:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-14 22:16:31 +0200
commit0de0ae5a20cf5c78a444449c531683b226810f5c (patch)
tree7d32a0e87d4e1cb7e208a99910092ac301ff2bc9
parenta6cac64f69bf526fe01840c0cd254436423e9e4b (diff)
downloadffmpeg-0de0ae5a20cf5c78a444449c531683b226810f5c.tar.gz
tag_tree_decode: check node being non null
Fixes CID717843 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/j2kdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/j2kdec.c b/libavcodec/j2kdec.c
index b2624f9f62..c712eb30e0 100644
--- a/libavcodec/j2kdec.c
+++ b/libavcodec/j2kdec.c
@@ -167,6 +167,9 @@ static int tag_tree_decode(J2kDecoderContext *s, J2kTgtNode *node, int threshold
J2kTgtNode *stack[30];
int sp = -1, curval = 0;
+ if(!node)
+ return AVERROR(EINVAL);
+
while(node && !node->vis){
stack[++sp] = node;
node = node->parent;