Skip to content

Crash during GzipArchive.unarchive #57

@PasiSalenius

Description

@PasiSalenius

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions