[DVDnav-discuss] Is it possible to work around `PTT search table too small.`?

Paul Menzel paulepanter at users.sourceforge.net
Mon Apr 22 23:23:52 CEST 2013


Dear DVD experts,


with the True Grit DVD (region 2) I am seeing the following error
message using `dvdbackup -M …`.

    libdvdread: PTT search table too small.

Others also seem to have that problem [1].

That is exactly the DVD from which this code originates from to fix a
segmentation fault [2]. The code was added in revision 1232.

        Author: erik
        Date:   Sat Aug 13 17:28:45 2011 +0000

            Fix crash when PTT is too short

            The PTT that is allocated and read is smaller than what gets referenced.
            The data is byte-swapped in place which results in writes to memory
            locations outside the allocated region. Region 1 True Grit is an
            example of this.

            Derived from a patch submitted by John Stebbins. Thanks!
        
        diff --git a/libdvdread/src/ifo_read.c b/libdvdread/src/ifo_read.c
        index 5f7ffa9..15bade5 100644
        --- a/libdvdread/src/ifo_read.c
        +++ b/libdvdread/src/ifo_read.c
        @@ -1184,6 +1184,10 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) {
             goto fail;
           }

        +  if(vts_ptt_srpt->nr_of_srpts > info_length / sizeof(*data)) {
        +    fprintf(stderr, "libdvdread: PTT search table too small.\n");
        +    goto fail;
        +  }
           for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) {
             B2N_32(data[i]);
             /* assert(data[i] + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1);

I wonder if it is possible to come up with a workaround, which does not
stop. Looking at the variables with GDB, in this case there is

        (gdb) p info_length
        $1 = 96
        (gdb) p sizeof(*data)
        $2 = 4
        (gdb) p *vts_ptt_srpt
        $3 = {nr_of_srpts = 99, zero_1 = 0, last_byte = 103, title = 0x0, ttu_offset = 0x0}

Unfortunately even after reading `libdvdnav/doc/dvd_structures` I have
no idea what the PTT (part of title track) actually does. Clueless as I
am, I did

        (gdb) p vts_ptt_srpt->nr_of_srpts = 24
        $4 = 24

but that resulted in a wrong image, as the folder the DVD was copied to
had a size greater than 19 GB, which is not right. I saw a lot of
»Filling up blocks(?)« messages – which I cannot find in the source, as
I used German local and do not have access to the system right now.

Additionally, I do not even now, what I am missing with this error?


Thanks,

Paul


[1] http://forum.ubuntuusers.de/topic/digitalisierung-einer-dvd-mittels-dvdbackup-sc/#post-4772402
[2] http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2011-July/001407.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20130422/a744af8d/attachment.asc>


More information about the DVDnav-discuss mailing list