changeset 4502:ff5472c81ab8 libavcodec

fix segfault with lol-ffplay2.mpg (dunno if this is exploitable, probably not easily)
author michael
date Fri, 09 Feb 2007 02:21:34 +0000
parents 665d7cd95fd3
children f334529b46ec
files mpeg12.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Fri Feb 09 02:02:09 2007 +0000
+++ b/mpeg12.c	Fri Feb 09 02:21:34 2007 +0000
@@ -2593,6 +2593,10 @@
             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;