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: Harden macho multi arch parsing code. #172

Merged
merged 4 commits into from
Dec 2, 2019

Conversation

mitsuhiko
Copy link
Member

This fixes a mis detection of class files as macho fat files by using a
heuristic to tell the files apart based on on number of macho embedded
architectures vs class file versions.

Additionally it changes the slicing code to manual slicing which prevents
us panicking if we accidentally read bad ranges from a macho file. This
happend commonly when we mis-characterized class files as macho fat files.

@mitsuhiko mitsuhiko self-assigned this Dec 1, 2019
@mitsuhiko mitsuhiko merged commit 46d0c5f into master Dec 2, 2019
@mitsuhiko mitsuhiko deleted the feature/fix-macho-panic branch December 2, 2019 11:08
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.

None yet

2 participants