fix(id3v2): read ID3v2.4 frame sizes written as plain integers #2940
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 162 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.305
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #2940"
general
weight: 0.35
bardrop
Resolves #2939.
ID3v2.4 (structure, section 4) requires a synchsafe frame size. iTunes and some other writers store a plain 32-bit integer there, as in ID3v2.3. Frames of 128 bytes or more were then read with the wrong length, and every frame after them was lost.
For ID3v2.4 frames,
getId3v24FrameLengthnow uses the plain size when:Otherwise the synchsafe size is kept, so valid tags are read as before. FFmpeg (
libavformat/id3v2.c) and TagLib use the same check.Tests: two synthetic tags in
test/read-id3v2.4.test.ts, one for each case. Both fail before this change.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Improved reading of ID3v2.4 tags when frame sizes use plain 32-bit values, helping preserve longer titles and correctly read album, artist, and genre information.
* Added warnings for frame sizes that are not synchsafe when the affected frame can still be read.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->