Skip to content

AIFF: Skip the padding of odd-sized COMT comments - #737

Merged
Serial-ATA merged 4 commits into
Serial-ATA:mainfrom
DistinctBee:aiff-comt-padding
Oct 7, 2026
Merged

Serial-ATA merged 4 commits into
Serial-ATA:mainfrom
DistinctBee:aiff-comt-padding

Conversation

@DistinctBee

Copy link
Copy Markdown
Contributor

closes #736

The pad of the final comment is still left to Chunks::skip(), so a file missing that pad keeps reading as it does today instead of failing at the end of the chunk.

Tests:

  • aiff_text_re_read_odd_sized_comments: round trip through dump_to, with odd-sized comments that aren't last
  • parse_padded_comments: hand-built bytes in the spec layout, not written by lofty
  • parse_unpadded_final_comment: a final comment without its pad still parses

AI Disclosure: the tests were written with Claude Code. I reviewed and ran them myself.

DistinctBee and others added 2 commits October 6, 2026 10:50
Every comment following an odd-sized one was read one byte early, either
returning garbage or failing to read the entire file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Serial-ATA Serial-ATA added this to the 0.25.5 milestone Oct 6, 2026
@Serial-ATA

Copy link
Copy Markdown
Owner

Thanks, I threw in an extra guard for non-zero padding

@Serial-ATA
Serial-ATA merged commit fb554eb into Serial-ATA:main Oct 7, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

AIFF: Error on odd-sized COMT comments

2 participants