ID3v2: Don't expect text frames to be terminated

This commit is contained in:
Serial 2023-10-01 10:13:06 -04:00 committed by Alex
parent d4916c4bbc
commit 4767f5da08
4 changed files with 9 additions and 1 deletions

View file

@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
incorrect duration and bitrate values.
- **APE**: Reading properties on older files will no longer error
- Older APE stream versions were not properly handled, leading to incorrect properties and errors.
- **ID3v2**: Don't expect text frames to be null terminated
## [0.15.0] - 2023-07-11

View file

@ -37,7 +37,7 @@ impl TextInformationFrame {
};
let encoding = verify_encoding(encoding_byte, version)?;
let value = decode_text(reader, encoding, true)?.content;
let value = decode_text(reader, encoding, false)?.content;
Ok(Some(TextInformationFrame { encoding, value }))
}

View file

@ -2364,4 +2364,11 @@ mod tests {
assert!(id3v2.remove_user_text(&description2).is_some());
assert!(id3v2.is_empty());
}
#[test]
fn read_multiple_composers_should_not_fail_with_bad_frame_length() {
// Issue #255
let tag = read_tag("tests/tags/assets/id3v2/multiple_composers.id3v24");
assert_eq!(tag.get_text("TCOM").as_deref().unwrap(), "A/B");
}
}

Binary file not shown.