avformat/libquvi: Fix whitelist handling
authorGilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Wed, 8 Apr 2015 12:38:11 +0000 (14:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Apr 2015 12:40:56 +0000 (14:40 +0200)
Fixes null pointer dereference

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

index 0a593cc..7c5f7a2 100644 (file)
@@ -76,6 +76,9 @@ static int libquvi_read_header(AVFormatContext *s)
     if (rc != QUVI_OK)
         goto quvi_fail;
 
+    if (!(qc->fmtctx = avformat_alloc_context()))
+            goto quvi_fail;
+
     if ((ret = ff_copy_whitelists(qc->fmtctx, s)) < 0)
         goto end;