summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-26 16:19:43 -0300
committerJames Almer <jamrial@gmail.com>2017-10-26 16:19:43 -0300
commitaf0505ed951505485f54c65decde2232385314f0 (patch)
treeea9ebbbe6227a5d1e0ea1bf84ff0265becb6410b /libavcodec
parentcdba33c45f79900a5dc6c5699acd4b7bdef78745 (diff)
parent6ac0e7818399a57e4684202bac79f35b3561ad1e (diff)
downloadffmpeg-af0505ed951505485f54c65decde2232385314f0.tar.gz
Merge commit '6ac0e7818399a57e4684202bac79f35b3561ad1e'
* commit '6ac0e7818399a57e4684202bac79f35b3561ad1e': mpeg4videodec: raise an error if sprite_trajectory.table is NULL Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg4videodec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 82c4f8fc8c..0203503599 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -189,6 +189,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;