]> git.sesse.net Git - ffmpeg/commitdiff
mpeg4videodec: raise an error if sprite_trajectory.table is NULL
authorSean McGovern <gseanmcg@gmail.com>
Thu, 30 Mar 2017 20:21:38 +0000 (16:21 -0400)
committerSean McGovern <gseanmcg@gmail.com>
Wed, 5 Apr 2017 21:23:39 +0000 (17:23 -0400)
CC: libav-stable@libav.org
Bug-Id: 1012

libavcodec/mpeg4videodec.c

index 8891ec1bb7912d2c35b1f41182eeac25efc17e02..eb1b67273bc9c2e99b888c5fe4a72554baba0793 100644 (file)
@@ -186,6 +186,10 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
     if (w <= 0 || h <= 0)
         return AVERROR_INVALIDDATA;
 
+    /* the decoder was not properly initialized and we cannot continue */
+    if (sprite_trajectory.table == NULL)
+        return AVERROR_INVALIDDATA;
+
     for (i = 0; i < ctx->num_sprite_warping_points; i++) {
         int length;
         int x = 0, y = 0;