summaryrefslogtreecommitdiffstats
path: root/contrib/libdvdread
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-11-10 20:01:32 +0000
committerjstebbins <[email protected]>2011-11-10 20:01:32 +0000
commit7ba6de82aceb432422a3fdc38e58c77e6da380c1 (patch)
treebac6955612a1e8f4fbae88b472b92d1a5ac0e9e9 /contrib/libdvdread
parent244c2cb62017c54941166224b1e4316839eb4d33 (diff)
Fix new dvd structure protection
Transformers 3 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4344 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/libdvdread')
-rw-r--r--contrib/libdvdread/A06-short-ptt-table2.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/libdvdread/A06-short-ptt-table2.patch b/contrib/libdvdread/A06-short-ptt-table2.patch
new file mode 100644
index 000000000..b9d6aede0
--- /dev/null
+++ b/contrib/libdvdread/A06-short-ptt-table2.patch
@@ -0,0 +1,21 @@
+Index: libdvdread/src/ifo_read.c
+===================================================================
+--- libdvdread/src/ifo_read.c (revision 1243)
++++ libdvdread/src/ifo_read.c (working copy)
+@@ -1190,7 +1190,15 @@
+ goto fail;
+ }
+ for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) {
+- B2N_32(data[i]);
++ /* Transformers 3 has PTT start bytes that point outside the SRPT PTT */
++ uint32_t start = data[i];
++ B2N_32(start);
++ if(start + sizeof(ptt_info_t) > vts_ptt_srpt->last_byte + 1) {
++ /* don't mess with any bytes beyond the end of the allocation */
++ vts_ptt_srpt->nr_of_srpts = i;
++ break;
++ }
++ data[i] = start;
+ /* assert(data[i] + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1);
+ Magic Knight Rayearth Daybreak is mastered very strange and has
+ Titles with 0 PTTs. They all have a data[i] offsets beyond the end of