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

Integer Overflow in BZip2 Decode #21

Closed
elihwyma opened this issue Apr 29, 2021 · 2 comments
Closed

Integer Overflow in BZip2 Decode #21

elihwyma opened this issue Apr 29, 2021 · 2 comments

Comments

@elihwyma
Copy link

Swift runtime failure: arithmetic overflow
Line 214 of BZip2.swift

The Packages file causing issues can be downloaded here

@tsolomko
Copy link
Owner

Thank you for your report.

I fixed this issue, the fix will be released in 4.5.9.

I have one question though. The issue is related to this statement from wikipedia: "While the specification theoretically allows for runs of length 256–259 to be encoded, the reference encoder will not produce such output". The implementation in SWCompression relied on this assumption that run lengths will be only up to 255, which the file you provided proves to be incorrect.

So I am curious: do you know by any chance what program was used to produce (compress) this file?

@elihwyma
Copy link
Author

Thanks for the fix

I have no idea what was used to create it. It came from an APT repo

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

2 participants