Re: libdvdread -- off by 1 errors (not your fault)

James Tappin <[email protected]>
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
On Thu, 29 Aug 2002 10:53:52 +0200
H}kan Hjort <[email protected]> wrote:

> > 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.  

This was actually the first one I found, but it only happens once, whereas the other is every "block".

> > 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... 

The problem here is that I only have a snail-mail address for the videographer responsible so, unless there is an indicator on the disc, it may take a while to find out.

> > 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.

Keep up the good work!
	James Tappin

-- 
James Tappin,               O__      "I forget the punishment for using
[email protected]     --  \/`    Microsoft --- Something lingering
http://www.xena.uklinux.net/          with data loss in it I fancy"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.