[MPlayer-dev-eng] bug in libdvdread causes "libdvdnav" segfaults - patch included
Peter Niemayer
niemayer at isg.de
Tue Sep 10 12:20:22 CEST 2002
Hi,
I experienced several segfaults when trying to play (unencrypted) DVDs
from harddisk using xine/ogle/mplayer with the respective libdvdnav
support feature.
I found that while libdvdnav itself may do something wrong by trying
to read beyond the end of the files, it was actually the fault of libdvdread
that a segfault resulted. The following tiny patch fixes the problem
and it seems that libdvdnav can very well live with the "short read"
result it gets then - navigation worked fine after applying the patch:
-----------------------------------------------------------------------------
--- dvd_reader.c.orig Mon Sep 9 21:40:16 2002
+++ dvd_reader.c Mon Sep 9 21:41:13 2002
@@ -795,6 +795,11 @@
/* FIXME: This is wrong if i is the last file in the set.
* also error from this read will not show in ret. */
+ if (dvd_file->title_devs[i + 1] == 0) {
+ /* no further files available */
+ return ret;
+ }
+
/* Read part 2 */
off = DVDinput_seek( dvd_file->title_devs[ i + 1 ],
0, DVDINPUT_NOFLAGS );
-----------------------------------------------------------------------------
Whoever has write-access to the libdvdread CVS: Please put the fix in :-)
Regards,
Peter Niemayer
More information about the MPlayer-dev-eng
mailing list