Skip to content

fix(playstation): Add compression limit#6211

Draft
tobias-wilfert wants to merge 3 commits into
masterfrom
tobias-wilfert/fix/playstation-compression-limit
Draft

fix(playstation): Add compression limit#6211
tobias-wilfert wants to merge 3 commits into
masterfrom
tobias-wilfert/fix/playstation-compression-limit

Conversation

@tobias-wilfert

@tobias-wilfert tobias-wilfert commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fix: INGEST-994 (More detail in the comments on the ticket).

@tobias-wilfert tobias-wilfert self-assigned this Jul 10, 2026
@linear-code

linear-code Bot commented Jul 10, 2026

Copy link
Copy Markdown

INGEST-994

Comment on lines -62 to -64
let data = relay_prosperoconv::extract_data(&prosperodump.payload()).map_err(|err| {
ProcessingError::InvalidPlaystationDump(format!("Failed to extract data: {err}"))
})?;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

let decoder = lz4_flex::frame::FrameDecoder::new(Cursor::new(bytes));
let mut decoder = decoder.take(limit.saturating_add(1) as u64);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mimics the existing logic here:

let decoder = decoder.take(max_size.saturating_add(1) as u64);
)

let data = relay_prosperoconv::extract_data(&prosperodump.payload()).map_err(|err| {
ProcessingError::InvalidPlaystationDump(format!("Failed to extract data: {err}"))
})?;
let data = uncompress(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did extract_data previously do the compression? If so, wouldn't it make more sense to pass a limit parameter into extract_data, so it can not be abused from (hypothetical) other call sites?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants