mpeg4videodec: raise an error if sprite_trajectory.table is NULL

CC: libav-stable@libav.org
Bug-Id: 1012
This commit is contained in:
Sean McGovern 2017-03-30 16:21:38 -04:00
parent b62ed68738
commit 6ac0e78183
1 changed files with 4 additions and 0 deletions

View File

@ -186,6 +186,10 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
if (w <= 0 || h <= 0) if (w <= 0 || h <= 0)
return AVERROR_INVALIDDATA; 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++) { for (i = 0; i < ctx->num_sprite_warping_points; i++) {
int length; int length;
int x = 0, y = 0; int x = 0, y = 0;