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 wrong path check in ImageLoaderMachO #4

Closed
wants to merge 1 commit into from

Conversation

disconnect3d
Copy link

This PR fixes a bug in strncmp(installPath, "/usr/libexec/oah/Shims", 9) - the size argument passed seems to be copied from a previous call and results in an incorrect path check as here only the "/usr/libe" prefix will be checked.

Please note that with my proposed change any directory path that starts with "/usr/libexec/oah/Shims" will be matched so "/usr/libexec/oah/ShimsSOMETHING" would also do.

I am not aware of this codebase, so maybe there should be a "/" at the end of this path?

This PR fixes a bug in `strncmp(installPath, "/usr/libexec/oah/Shims", 9)` - the size argument passed seems to be copied from a previous call and results in an incorrect path check as here only the `"/usr/libe"` prefix will be checked.

Please note that with my proposed change any directory path that starts with `"/usr/libexec/oah/Shims"` will be matched so `"/usr/libexec/oah/ShimsSOMETHING"` would also do.

I am not aware of this codebase, so maybe there should be a `"/"` at the end of this path?
@disconnect3d
Copy link
Author

disconnect3d commented Apr 13, 2020

I noticed this is an unofficial fork. I am going to report this further.

EDIT: This has been reported to Apple & fixed.

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.

1 participant