Page MenuHomeFreeBSD

makefs: Fix cd9660 filename buffer maximum length
ClosedPublic

Authored by emaste on Dec 24 2024, 4:20 PM.
Tags
None
Referenced Files
F108416649: D48193.diff
Fri, Jan 24, 3:02 PM
Unknown Object (File)
Tue, Jan 14, 3:51 AM
Unknown Object (File)
Tue, Jan 14, 3:50 AM
Unknown Object (File)
Tue, Jan 14, 3:50 AM
Unknown Object (File)
Tue, Jan 14, 3:50 AM
Unknown Object (File)
Tue, Jan 14, 3:41 AM
Unknown Object (File)
Thu, Jan 9, 5:33 PM
Unknown Object (File)
Thu, Dec 26, 9:02 PM
Subscribers
None

Details

Summary
The maximum length is 30 characters for name and extension, two
separators (. and ;) and 5 characters for file version from 1 to 32767,
which is 37 characters.  Add one for the null term as we treat these
buffers as C strings.

This is not an issue in practice, as the file version is always 1 in
makefs.

While here, drop `_WITH_PADDING` from the macro name and update the
previously-unused ISO_FILENAME_MAXLENGTH for the corrected length.
A 0x00 padding byte is used by ISO9660 when needed for alignment, which
can be the null byte at the end of the string.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped