Serial-ATA / Serial-ATA/lofty-rs

ID3v2: Remove invalid padding on write

Open
#262 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement low priority
Dominant language
Rust
Stars
359
Forks
77
Avg merge
12h 54m
Merged PRs (30d)
11

Description

It's a common issue that padding will often stick around between tag edits, as it is typically not properly accounted for in the tag header size.

We currently just get the tag size from the header and replace that many bytes with the new tag when writing, similar to other libraries. The problem is, when a tag has invalid padding that isn't included in the size, it will remain in the file indefinitely.

It may be worth removing the padding if we can reliably detect it without destroying any important data.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the ID3v2 writing path and the code that reads the tag header size. Investigate how invalid padding could be distinguished from important data; done means writes no longer retain detectable invalid padding while preserving valid content, with regression coverage for the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.