libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO
Date: Sat, 26 May 2018 16:33:41 -0400

On Sat, May 26, 2018 at 3:59 PM, Thomas Schmitt <address@hidden> wrote:

> Hi,
>
> Pete Batard wrote:
> > So the way libcdio bails out depends on how you are trying to access the
> > content.
>
> Yep. With some run-up i noticed myself.
>
>
> > Finally, if one replaces the calls to from_733_with_err() to from_733()
> in
> > iso9660_fs.c then both the issue with isolist and isofile go away, so
> that's
> > what I would advocate as a patch.
>
> I second that idea.
> But both calls do quite the same. from_733_with_err() tells that it has
> warned, but we could as well just ignore the "err" parameter when calling
> it.
>
> It does not provide much info if from_733() warns without saying where
> the bad byte string came from. This knowledge is in the caller who will
> not know that a warning was emitted.
> So i think from_733() should not warn but just convert.
>
> -----------------------------------------------------------------------
>
> This brings me to a potential problem with endianness:
>
>   from_733 (uint64_t p)
>   {
>      ...
>      return (UINT32_C(0xFFFFFFFF) & p);
>   }
>
> It does not look to me as if reading of iso9660_dir_t does any conversions
> or byte swappings which would swap the higher indexed bytes of a 7.3.3
> field to the lower four bytes.
>
> So the first 4 bytes of p are the number in little-endian representation.
> So above return will yield a wrong result on big-endian CPUs
>
> Since the source file is named "bytesex.h" i wonder why it's not
>      return uint32_from_le(UINT32_C(0xFFFFFFFF) & p);
>
> Opinions. Can somebody defute my concerns ?
> Does anybody have a machine or VM with big-endin CPU ?
> (Does "isolist" work properly there ?)
>
>
Thanks to the gcc compile farm, I have access to some IBM POWER
architecture boxes. I will try it there when I get a chance.
In the past though I have tried this on Solaris SPARK, and I'm pretty sure
regression tests worked there. But then maybe we
just didn't have decent tests.




-----------------------------------------------------------------------
>
> Have a nice day :)
>
> Thomas
>
>
>


reply via email to

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