mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-12 13:42:34 +00:00
ID3v2: Don't expect text frames to be terminated
This commit is contained in:
parent
d4916c4bbc
commit
4767f5da08
4 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 }))
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
BIN
tests/tags/assets/id3v2/multiple_composers.id3v24
Normal file
BIN
tests/tags/assets/id3v2/multiple_composers.id3v24
Normal file
Binary file not shown.
Loading…
Reference in a new issue