diff options
author | Martijn Kaijser <machine.sanctum@gmail.com> | 2014-11-25 14:30:42 +0100 |
---|---|---|
committer | Martijn Kaijser <machine.sanctum@gmail.com> | 2014-11-25 14:30:42 +0100 |
commit | bc05c4be94bbde7e9f9147ae8e9a9b1810536dd0 (patch) | |
tree | e68acd72e208a3db2783b4846cb1bc310bd6d93d | |
parent | 1111f906cffb0d172cffe053b95b23d6d11d65d0 (diff) | |
parent | 99b430fe2f9301485434a29a46a32c6dec8c36eb (diff) |
Merge pull request #5806 from Memphiz/fixisocrash
[libdvdread] - fix out of bound access when playing some iso files
-rw-r--r-- | lib/libdvd/libdvdread/src/dvd_reader.c | 2 | ||||
-rw-r--r-- | lib/libdvd/patches/01-libdvdread.diff | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c index f8df635797..6d3c21e5b3 100644 --- a/lib/libdvd/libdvdread/src/dvd_reader.c +++ b/lib/libdvd/libdvdread/src/dvd_reader.c @@ -1248,7 +1248,7 @@ int DVDCheckSector(unsigned char *data, int offset) { int i = 0; int32_t *p = (int32_t*)data + (DVD_VIDEO_LB_LEN>>2)*offset; - for(;i<(DVD_VIDEO_LB_LEN<<2);i++) { + for(;i<(DVD_VIDEO_LB_LEN>>2);i++) { if(*(p+i) != 0) break; } diff --git a/lib/libdvd/patches/01-libdvdread.diff b/lib/libdvd/patches/01-libdvdread.diff index d31c566053..f388217312 100644 --- a/lib/libdvd/patches/01-libdvdread.diff +++ b/lib/libdvd/patches/01-libdvdread.diff @@ -147,7 +147,7 @@ diff -uwr libdvdread-4.2.1/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r +{ + int i = 0; + int32_t *p = (int32_t*)data + (DVD_VIDEO_LB_LEN>>2)*offset; -+ for(;i<(DVD_VIDEO_LB_LEN<<2);i++) { ++ for(;i<(DVD_VIDEO_LB_LEN>>2);i++) { + if(*(p+i) != 0) + break; + } |