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
)
Conflicts:
libavcodec/mpeg4videodec.c
This commit is contained in:

committed by
Michael Niedermayer

parent
0b5405c443
commit
3339bae219
@@ -186,13 +186,13 @@ static int mpeg4_decode_sprite_trajectory(MpegEncContext *s, GetBitContext *gb)
|
||||
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(!(s->divx_version==500 && s->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 */
|
||||
|
Reference in New Issue
Block a user