Browse Source

fix segfault with lol-ffplay2.mpg (dunno if this is exploitable, probably not easily)

Originally committed as revision 7889 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 19 years ago
parent
commit
960964f5a9
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/mpeg12.c

+ 4
- 0
libavcodec/mpeg12.c View File

@@ -2593,6 +2593,10 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
break;
}
}
if(s->mb_x >= (unsigned)s->mb_width){
av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n");
return -1;
}

s->resync_mb_x= s->mb_x;
s->resync_mb_y= s->mb_y= mb_y;


Loading…
Cancel
Save