# HG changeset patch # User michael # Date 1139224886 0 # Node ID 421579792fc2207149e5a8f1daa4d5b622cbb0a8 # Parent 0284d5b349161509bf9c1239e8212b773c129bca 1 goto 1 fix diff -r 0284d5b34916 -r 421579792fc2 mpegvideo.c --- a/mpegvideo.c Mon Feb 06 11:21:10 2006 +0000 +++ b/mpegvideo.c Mon Feb 06 11:21:26 2006 +0000 @@ -231,6 +231,10 @@ const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){ int i; + assert(p<=end); + if(p>=end) + return end; + for(i=0; i<3; i++){ uint32_t tmp= *state << 8; *state= tmp + *(p++);