Comment 7 for bug 852345

Revision history for this message
Bryce Harrington (bryce) wrote :

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