Had to downgrade libdvdread3 from 0.9.6-1 to 0.9.4-5.1 (unstable ->
testing) to resolve "undefined symbol: UDFFindFile", but once that was
done dvdbackup 0.1.1-5 appears to work properly.

I did a bit more research into the problem and it looks like the stack
gets smashed by libdvdread3's DVDFileStatVOBUDF() -- see attachment for
a snippet of my gdb session. That said, the code looks safe upon first
inspection.

I did most of the debugging with dvdbackup and libdvdread3 compiled with
-O2, some with -O1, and -O0 was prohibitively slow so I couldn't debug
non-optimised code (perhaps this is something of a bug in dvdbackup?).

I will have a look through the changes between 0.1.1-5 and 0.1.1-6.

I have now tested with two different discs on two different machines.

You can find me on #debian-devel under the nick 'tedp' at the moment.

-Ted

Stephen Gran wrote:
> Can you please try with 0.1.1-5?
(gdb) n
1050        statbuf->parts_size[n] = parts_size[n];
(gdb) bt
#0  DVDFileStatVOBUDF (dvd=0x8054018, title=2, menu=0, statbuf=0xafc2b2a0) at 
dvd_reader.c:1050
#1  0xa7ee97f1 in DVDFileStat (dvd=0x8054018, titlenum=2, 
domain=DVD_READ_TITLE_VOBS, statbuf=0xafc2b2a0) at dvd_reader.c:1163
#2  0x0804a6ce in DVDGetFileSet (_dvd=0x8054018) at dvdbackup.c:1667
#3  0x0804b11e in DVDDisplayInfo (_dvd=0x8054018, dvd=0x3 <Address 0x3 out of 
bounds>) at dvdbackup.c:2042
#4  0x0804d969 in main (argc=6, argv=0xafc2c4e4) at dvdbackup.c:2356
(gdb) n
1049      for(n = 0; n < nr_parts; n++) {
(gdb) bt
#0  DVDFileStatVOBUDF (dvd=0x8054018, title=2, menu=0, statbuf=0xafc2b2a0) at 
dvd_reader.c:1049
#1  0xa7ee97f1 in DVDFileStat (dvd=0x8054018, titlenum=2, 
domain=DVD_READ_TITLE_VOBS, statbuf=0xafc2b2a0) at dvd_reader.c:1163
#2  0x0804a6ce in DVDGetFileSet (_dvd=0x8054018) at dvdbackup.c:1667
#3  0x0804b11e in DVDDisplayInfo (_dvd=0x8054018, dvd=0x3ffd5000 <Address 
0x3ffd5000 out of bounds>) at dvdbackup.c:2042
#4  0x0804d969 in main (argc=6, argv=0xafc2c4e4) at dvdbackup.c:2356
(gdb) n
1050        statbuf->parts_size[n] = parts_size[n];
(gdb) bt
#0  DVDFileStatVOBUDF (dvd=0x8054018, title=2, menu=0, statbuf=0xafc2b2a0) at 
dvd_reader.c:1050
#1  0xa7ee97f1 in DVDFileStat (dvd=0x8054018, titlenum=2, 
domain=DVD_READ_TITLE_VOBS, statbuf=0xafc2b2a0) at dvd_reader.c:1163
#2  0x0804a6ce in DVDGetFileSet (_dvd=0x8054018) at dvdbackup.c:1667
#3  0x0804b11e in DVDDisplayInfo (_dvd=0x8054018, dvd=0x4 <Address 0x4 out of 
bounds>) at dvdbackup.c:2042
#4  0x0804d969 in main (argc=6, argv=0xafc2c4e4) at dvdbackup.c:2356
(gdb) n
1049      for(n = 0; n < nr_parts; n++) {
(gdb) print nr_parts
$4 = 6
(gdb) bt
#0  DVDFileStatVOBUDF (dvd=0x8054018, title=2, menu=0, statbuf=0xafc2b2a0) at 
dvd_reader.c:1049
#1  0xa7ee97f1 in DVDFileStat (dvd=0x8054018, titlenum=2, 
domain=DVD_READ_TITLE_VOBS, statbuf=0xafc2b2a0) at dvd_reader.c:1163
#2  0x0804a6ce in DVDGetFileSet (_dvd=0x8054018) at dvdbackup.c:1667
#3  0x0804b11e in DVDDisplayInfo (_dvd=0x3ffd5000, dvd=0x3ffd5000 <Address 
0x3ffd5000 out of bounds>) at dvdbackup.c:2042
#4  0x0804d969 in main (argc=6, argv=0xafc2c4e4) at dvdbackup.c:2356
(gdb) n
1050        statbuf->parts_size[n] = parts_size[n];
(gdb) bt
#0  DVDFileStatVOBUDF (dvd=0x8054018, title=2, menu=0, statbuf=0xafc2b2a0) at 
dvd_reader.c:1050
#1  0xa7ee97f1 in DVDFileStat (dvd=0x8054018, titlenum=2, 
domain=DVD_READ_TITLE_VOBS, statbuf=0xafc2b2a0) at dvd_reader.c:1163
#2  0x0804a6ce in DVDGetFileSet (_dvd=0x8054018) at dvdbackup.c:1667
#3  0x0804b11e in DVDDisplayInfo (_dvd=0x3ffd5000, dvd=0x5 <Address 0x5 out of 
bounds>) at dvdbackup.c:2042
#4  0x0804d969 in main (argc=6, argv=0xafc2c4e4) at dvdbackup.c:2356
(gdb) n
1049      for(n = 0; n < nr_parts; n++) {
(gdb) bt
#0  DVDFileStatVOBUDF (dvd=0x8054018, title=2, menu=0, statbuf=0xafc2b2a0) at 
dvd_reader.c:1049
#1  0xa7ee97f1 in DVDFileStat (dvd=0x8054018, titlenum=2, 
domain=DVD_READ_TITLE_VOBS, statbuf=0xafc2b2a0) at dvd_reader.c:1163
#2  0x0804a6ce in DVDGetFileSet (_dvd=0x8054018) at dvdbackup.c:1667
#3  0x0804b11e in DVDDisplayInfo (_dvd=0x3ffd5000, dvd=0x36341000 <Address 
0x36341000 out of bounds>) at dvdbackup.c:2042
Previous frame inner to this frame (corrupt stack?)
(gdb) print n
$5 = 5
(gdb) print nr_parts
$6 = 6
(gdb) print &n
$7 = (int *) 0xafc299b0

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to