Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: panic for empty or otherwise too small inner file #41

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

aaronleopold
Copy link
Contributor

I've added a check before the beginning of XMLReader::parse to ensure the container content has enough byte content to avoid a panic, something that was reported originally in stumpapp/stump#259

I originally added the faulty/corrupt file and an additional test, but realized I doubt the license for it is permissive (e.g. creative commons or public domain) to put directly in the repo so left it out here. While there is definitely a fault in the file itself, I figure a bit of added safety here doesn't hurt.

Copy link
Owner

@danigm danigm left a comment

Choose a reason for hiding this comment

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

LGTM

@danigm danigm merged commit 6c9aac8 into danigm:master Feb 5, 2024
3 of 6 checks passed
@aaronleopold aaronleopold deleted the al/fix-xml-panic branch February 5, 2024 13:26
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