Browse Source

mpeg4videodec: only allow a positive length

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b3408ae4c6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4.9
Andreas Cadhalpun Michael Niedermayer 11 years ago
parent
commit
f7a6a6d591
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/mpeg4videodec.c

+ 2
- 2
libavcodec/mpeg4videodec.c View File

@@ -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))
skip_bits1(gb); /* marker bit */

length = get_vlc2(gb, sprite_trajectory.table, SPRITE_TRAJ_VLC_BITS, 3);
if (length)
if (length > 0)
y = get_xbits(gb, length);

skip_bits1(gb); /* marker bit */


Loading…
Cancel
Save