Skip to content

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

@Abyss-W4tcher

Description

@Abyss-W4tcher

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions