diff options
author | Memphiz <memphis@machzwo.de> | 2014-11-24 23:41:33 +0100 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2014-11-24 23:41:33 +0100 |
commit | 99b430fe2f9301485434a29a46a32c6dec8c36eb (patch) | |
tree | 0be91e5bb41ca8559fdaece864762166c274af58 | |
parent | 968c62470b4d947c72341a170ca4bb2865781d8b (diff) |
[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; + } |