Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create file in UDF ISO with a filename length = 255 #132

Open
Abyss-W4tcher opened this issue Jan 4, 2025 · 0 comments
Open

Cannot create file in UDF ISO with a filename length = 255 #132

Abyss-W4tcher opened this issue Jan 4, 2025 · 0 comments

Comments

@Abyss-W4tcher
Copy link

Hi,

I am trying to add a file into an UDF ISO with 255 "A" as filename, for testing. When I do, it raises the following error:

/pycdlib/udf.py", line 4561, in record
    rec = struct.pack(self.FMT, b'\x00' * 16, 1,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: 'B' format requires 0 <= number <= 255

Looking at fi variable:

b'\x08AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'

It seems that the identifier is included in the filename packing, which makes it 256. As a filename with 255 characters should be allowed, I am guessing that there is an off-by-one error here ?

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant