Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- **ID3v2**: Don't error on empty UTF-16 descriptions ([issue](https://github.com/Serial-ATA/lofty-rs/issues/613)) ([PR](https://github.com/Serial-ATA/lofty-rs/pull/614))
- **Timestamp**: Only enforce valid year in strict mode ([issue](https://github.com/Serial-ATA/lofty-rs/issues/615)) ([PR](https://github.com/Serial-ATA/lofty-rs/pull/616))
- **OGG Vorbis**: Fixed potential infinite loop while property reading ([issue](https://github.com/Serial-ATA/lofty-rs/issues/620)) ([PR](https://github.com/Serial-ATA/lofty-rs/pull/622))

## [0.23.2] - 2026-02-14

Expand Down
4 changes: 4 additions & 0 deletions lofty/src/ogg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ where
// the stream should be well below the maximum size.
let last_page_header;
loop {
let current_pos = data.stream_position()?;

match PageHeader::read(data) {
Ok(h) => {
last_page_header = h;
Expand All @@ -73,6 +75,8 @@ where
Err(
PageError::MissingMagic | PageError::InvalidVersion | PageError::BadSegmentCount,
) => {
data.seek(SeekFrom::Start(current_pos))?;

if !data
.rfind(PATTERN)
.buffer_size(BUFFER_SIZE)
Expand Down
Binary file not shown.
8 changes: 8 additions & 0 deletions lofty/tests/fuzz/vorbisfile_read_from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ fn panic1() {
crate::get_reader("vorbisfile_read_from/order01d_IDX_32_RAND_22064097693866277502540.ogg");
let _ = VorbisFile::read_from(&mut reader, ParseOptions::new());
}

#[test_log::test]
fn infinite_loop() {
let mut reader = crate::get_reader(
"vorbisfile_read_from/order01d_IDX_62_RAND_1029626158139888904228417_minimized_403.ogg",
);
let _ = VorbisFile::read_from(&mut reader, ParseOptions::new());
}