Re: libdvdread -- off by 1 errors (not your fault)
H}kan Hjort <[email protected]>
| Newsgroups | gmane.comp.video.ogle.devel |
|---|---|
| Message-ID | <[email protected]> |
Wed Aug 28 2002, James Tappin wrote: > There would appear to be at least 1 dvd authoring package out there that > is generating DVDs with off-by-one errors in the lengths of some fields. > Since the validity of these fields is check by an assert in libdvdread, to > play said DVDs I have had to comment out the relevant assertions (and > print the values instead). > > Line numbers refer to release 0.93. > > The first is at line 950 of ifo_read.c: > assert(n > 0 && (n % 4) == 0; > These DVDs have n=61 > Haven't seen this before. > the other is at line 184 of nav_read.c: > assert(dsi->dsi_gi.zero1 == 0); > these have dsi->dsi_gi.zero1 == 1 > Have seen this, perhaps among others, it's produced by the MacOSX DVD creation software. Which seems to becomming ever more popular as more people burn their own DVD-R. > This affects both ogle and xine-dvdnav playback (xine-dvdnav also fails > another assert in xine-lib that I've not yet tracked down in detail). > While it's pretty obvious to me that the author of the writing software > has double-allowed for the null at the end of a string, this is probably > a commercial package for windows or mac so I doubt there's much chance of > exterminating it. > If some one could confirm which program it is and at least report it as a bug... > Is it reasonable that these asserts be downgraded to some kind of warning > message as the DVD plays correctly in ogle when they are ignored. > Yes, and I've been intending to do this for a while now. It's not always as simple as to just remove the assert. Ofthen it needs to be replaced by both a check to emit a warnings and some new code to patch up the values to some thing safe that won't crash or currupt memmory later. -- Håkan Hjort