I've reviewed and experimented with the patch, and on natty have
reproduced both the original problem and fix.  Let me also express
gratitude to jim sixtyfive for the fix.

The patch is essentially scanning the upper of the two-byte code for
unicode16 strings  and if it has any non-zero value it blanks out the
remainder of the string.  In this particular case, this results in an
empty string, thus causing the garbage file to be ignored.

The patch also improves the existing coding style, by  using memcpy
instead of manual do {} while pointer copy.

However, some of the coding style in the patch seemed a bit sketchy to
me; for instance "data[-1]" feels like trouble waiting to happen; it
works as coded, but could bite some future maintainer if they're not
aware of it.  I've gone ahead and fixed this, and added some comments
and stuff to make the code clearer.  I've tested this both with a dvd
that expresses this bug, and one normal one, and both worked properly.

Here is a PPA with both natty and oneiric packages of this fix:

  https://launchpad.net/~bryce/+archive/lp852345

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/852345

Title:
  Libdvdread misses hidden files and causes segfaults to calling
  programs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libdvdread/+bug/852345/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to