Author: nicodvb Date: Sat Apr 19 11:40:03 2008 New Revision: 1007 Log: prevent access to index ouf of bounds when iterating over titles; patch by Erik Hovland - erik hovland org Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c ============================================================================== --- trunk/libdvdnav/src/dvdread/dvd_reader.c (original) +++ trunk/libdvdnav/src/dvdread/dvd_reader.c Sat Apr 19 11:40:03 2008 @@ -971,7 +971,8 @@ static int DVDReadBlocksPath( dvd_file_t * also error from this read will not show in ret. */ /* Does the next part exist? If not then return now. */ - if( !dvd_file->title_devs[ i + 1 ] ) return ret; + if( i + 1 >= TITLES_MAX || !dvd_file->title_devs[ i + 1 ] ) + return ret; /* Read part 2 */ off = dvdinput_seek( dvd_file->title_devs[ i + 1 ], 0 );
participants (1)
-
nicodvb