avcodec/vc1dec: fix null pointer dereference
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 25 Aug 2014 00:17:32 +0000 (02:17 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Oct 2014 01:16:38 +0000 (03:16 +0200)
Fixes Ticket3860

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 30f680ee0a2707af9a649a0aa3fd951d18a25c05)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vc1dec.c

index a73d615..2d4fdd3 100644 (file)
@@ -5484,7 +5484,7 @@ static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb)
     if (ret < 0)
         return ret;
 
-    if (!s->current_picture.f->data[0]) {
+    if (!s->current_picture.f || !s->current_picture.f->data[0]) {
         av_log(avctx, AV_LOG_ERROR, "Got no sprites\n");
         return -1;
     }