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

Crash during GzipArchive.unarchive #57

Open
PasiSalenius opened this issue Jul 15, 2024 · 0 comments
Open

Crash during GzipArchive.unarchive #57

PasiSalenius opened this issue Jul 15, 2024 · 0 comments

Comments

@PasiSalenius
Copy link

PasiSalenius commented Jul 15, 2024

I'm seeing crashes for my app that uses SWCompression for Gzip and Deflate decompression. Most probably this is invalid data which isn't actually Gzip compressed, but I'm not exactly sure, as I have never seen this same crash in my own testing of the app.

You can find relevant parts of the stack trace attached below. I'm not too familiar with the code base so did not go ahead with a PR, but maybe there should be a guard check for the last item in the array here, instead of forced unwrap?

Edit: Ah now I notice that the length has 0 items here. Maybe this should be caught earlier before arriving to this method so an error can be thrown for invalid compressed data?

Screenshot 2024-07-15 at 12 58 41 Screenshot 2024-07-15 at 12 58 53
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

No branches or pull requests

1 participant