[FFmpeg-cvslog] mpeg4videodec: raise an error if sprite_trajectory.table is NULL

Sean McGovern git at videolan.org
Thu Oct 26 22:21:41 EEST 2017


ffmpeg | branch: master | Sean McGovern <gseanmcg at gmail.com> | Thu Mar 30 16:21:38 2017 -0400| [6ac0e7818399a57e4684202bac79f35b3561ad1e] | committer: Sean McGovern

mpeg4videodec: raise an error if sprite_trajectory.table is NULL

CC: libav-stable at libav.org
Bug-Id: 1012

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ac0e7818399a57e4684202bac79f35b3561ad1e
---

 libavcodec/mpeg4videodec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 8891ec1bb7..eb1b67273b 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -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;



More information about the ffmpeg-cvslog mailing list