diff options
author | Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> | 2015-04-22 16:32:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-22 16:57:52 +0200 |
commit | b3408ae4c64cb674b1d5f0f30171759113ce722a (patch) | |
tree | e8b441c02cf647ce78d188d5a1dfc3b1ed3a2a34 /libavcodec | |
parent | 35e855d5b6950887320040da723cf5d5085263a7 (diff) | |
download | ffmpeg-b3408ae4c64cb674b1d5f0f30171759113ce722a.tar.gz |
mpeg4videodec: only allow a positive length
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg4videodec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 8449392ea1..9bf33dd253 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -189,14 +189,14 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g int x = 0, y = 0; length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 3); - if (length) + if (length > 0) x = get_xbits(gb, length); if (!(ctx->divx_version == 500 && ctx->divx_build == 413)) check_marker(gb, "before sprite_trajectory"); length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 3); - if (length) + if (length > 0) y = get_xbits(gb, length); check_marker(gb, "after sprite_trajectory"); |