libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] modifications of ISO9660 and UDF headers for MSVC


From: Pete Batard
Subject: Re: [Libcdio-devel] modifications of ISO9660 and UDF headers for MSVC
Date: Mon, 30 Jan 2012 14:05:01 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1

On 2012.01.30 02:28, Rocky Bernstein wrote:
Therefore, instead of defining:

     iso711_t filename_len;
     char     filename[];

We leverage the fact that iso711_t and char are the same size and the
following union:

union {
     iso711_t        len;
     char            str[1];
} filename;

It is exactly for changes like this that I wish there were more preexisting
tests. Still, it is not too late to start going forth.

Since this is a change that actually breaks compilation, that makes it difficult to have left a spot that shouldn't have been patched. The only possibilities there are:

- unpatched code using the old ->filename[] string access, that depends on a specific feature being enabled. This is actually the reason why I added the enabling of rockridge in autogen-pbatard.sh, as it didn't seem to be enabled by default. I'm also testing with the default autogen now. Also, I ran a search for anything .c for filename[] use one an ISO9660 struct and it didn't turn anything

- when patching the code, I missed the increment in the string offset, and used str[0] instead of str[1]. I tried to be careful about it, and checked for leftover str[0] as well, so I don't think I missed anything, but that's always a possibility.

At least in the extraction tests that I ran, the directory filenames don't seem to be mangled.

Regards,

/Pete



reply via email to

[Prev in Thread] Current Thread [Next in Thread]