The array title_devs has only 9 entries. The for loop
From: Erik Hovland <erik@hovland.org>
does stop at index 8. But the code within the for loop
can do a i+1. Which would overrun to index 9. This patch
prevents that.
---
libs/libmythdvdnav/dvd_reader.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libs/libmythdvdnav/dvd_reader.c b/libs/libmythdvdnav/dvd_reader.c
index f44bbab..29e7855 100644
a
|
b
|
static int DVDReadBlocksPath( dvd_file_t *dvd_file, unsigned int offset, |
951 | 951 | * also error from this read will not show in ret. */ |
952 | 952 | |
953 | 953 | /* Does the next part exist? If not then return now. */ |
954 | | if( !dvd_file->title_devs[ i + 1 ] ) return ret; |
| 954 | if( i == 8 || !dvd_file->title_devs[ i + 1 ] ) return ret; |
955 | 955 | |
956 | 956 | /* Read part 2 */ |
957 | 957 | off = dvdinput_seek( dvd_file->title_devs[ i + 1 ], 0 ); |