[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: |
Thomas Schmitt |
Subject: |
Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO |
Date: |
Sat, 26 May 2018 21:59:16 +0200 |
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 ?)
-----------------------------------------------------------------------
Have a nice day :)
Thomas
- [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Pete Batard, 2018/05/26
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Thomas Schmitt, 2018/05/26
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Pete Batard, 2018/05/26
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO,
Thomas Schmitt <=
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Rocky Bernstein, 2018/05/26
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Thomas Schmitt, 2018/05/26
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Pete Batard, 2018/05/26
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Thomas Schmitt, 2018/05/26
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Thomas Schmitt, 2018/05/26
- [Libcdio-devel] [PATCH] Fix invalid/bad directory errors with openSUSE Leap 15.0 ISO, Pete Batard, 2018/05/27
- Re: [Libcdio-devel] [PATCH] Fix invalid/bad directory errors with openSUSE Leap 15.0 ISO, Rocky Bernstein, 2018/05/27
- Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Thomas Schmitt, 2018/05/28
Re: [Libcdio-devel] Invalid/bad directory errors with openSUSE Leap 15.0 ISO, Thomas Schmitt, 2018/05/26