diff options
author | Sean McGovern <gseanmcg@gmail.com> | 2017-03-30 16:21:38 -0400 |
---|---|---|
committer | Sean McGovern <gseanmcg@gmail.com> | 2017-04-05 17:23:39 -0400 |
commit | 6ac0e7818399a57e4684202bac79f35b3561ad1e (patch) | |
tree | 0843a2adad16c5fba4379fa4064fb65e512944ab | |
parent | b62ed6873821c8fce8f7e2c2927ae54f86afeb22 (diff) | |
download | ffmpeg-6ac0e7818399a57e4684202bac79f35b3561ad1e.tar.gz |
mpeg4videodec: raise an error if sprite_trajectory.table is NULL
CC: libav-stable@libav.org
Bug-Id: 1012
-rw-r--r-- | libavcodec/mpeg4videodec.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |