[DVDnav-discuss] Libdvdread misses hidden files and causes segfaults to calling programs

Erik Hovland erik at hovland.org
Tue Sep 20 00:48:37 CEST 2011


I find it comical that the release of Thor is what is causing this
turbulence. Could we be more nerdy.

On Mon, Sep 19, 2011 at 3:27 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Mon, Sep 19, 2011 at 03:22:55PM -0700, John Stebbins wrote:
>> On 09/18/2011 11:12 AM, doug Springer wrote:
>> > Package: libdvdread4
>> > Version: 4.1.4-1219-2 and others
>> >
>> > No error message, but symptoms are usually segfault when reading, for example the Movie DVD Thor.
>> > This results from a new anti-copy scheme where the real video_ts.ifo is hidden. Use of the decoy video_ts.ifo results in
>> > a unplayable DVD.
>> >
>>
>> This patch has been submitted twice already, but I like my version better.  The other 2 unnecessarily truncate the
>> string when something is found in the high byte.  This fills that string the same as pre-patch, but returns a code
>> indicating that junk was found in the MSB.
>
> I[n] that case I don't see the point in making things hard to review
> by rewriting the whole function.

I agree that both patches that chose to rewrite the function are hard to
review. But the function looks like a hack to begin w/. I am not opposed to
a rewrite if we can agree that it is the best option. Note that
some more annotation on the rewrite patches would help
us review it faster.

> Why not just
> Index: dvd_udf.c
> ===================================================================
> --- dvd_udf.c   (revision 1233)
> +++ dvd_udf.c   (working copy)
> @@ -329,16 +329,17 @@
>  static int Unicodedecode( uint8_t *data, int len, char *target )
>  {
>   int p = 1, i = 0;
> +  int err = 0;
>
>   if( ( data[ 0 ] == 8 ) || ( data[ 0 ] == 16 ) ) do {
> -    if( data[ 0 ] == 16 ) p++;  /* Ignore MSB of unicode16 */
> +    if( data[ 0 ] == 16 ) err |= data[ p++ ];  /* Ignore MSB of unicode16 */

We have to drop the comment if we are going to stop ignoring the MSB.
But I appreciate that a 4 line patch is much easier to review then a rewrite.

E

-- 
Erik Hovland
erik at hovland.org
http://hovland.org/


More information about the DVDnav-discuss mailing list