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

Added safety checks to fishhook.c #62

Closed
wants to merge 2 commits into from
Closed

Added safety checks to fishhook.c #62

wants to merge 2 commits into from

Conversation

chrisspankroy
Copy link

Fixes a crash that would occur on devices running iOS 13. fishhook.c would access bad memory, this adds safety checks to the offending line. This fixes #61

@daybreak1024
Copy link

Hello, I am experiencing the same problem.

I Use this program,but hook would be invalid.

Why indirect_symbol_bindings would out of bounds? Can you give me some prompt or inspiration.

And thanks.

dyy1993 pushed a commit to dyy1993/react-native that referenced this pull request Aug 28, 2019
@PotatoMapper
Copy link

Pulled and Testing on a 13 Beta device I had available and PR works well and as designed 👌

@dinhvh
Copy link

dinhvh commented Sep 11, 2019

Any idea of the condition under which it happens?

@megCanicalKb
Copy link
Contributor

Have you tested this locally to verify that the symbols were still rebinded?

indirect_symbol_bindings is a void** so sizeof() will return 8 bytes on arm64, then indirect_symbol_bindings[0] has the same size which means the line is simplified:

if (i < (8 / 8)) { ... }

I am not sure what check you are trying to add but I don't think that's the right code for it. You might have been hoping that sizeof(ptr) returns the total size of the array, but this only works for statically allocated arrays, with a size known by the compiler at compile time (here it's not).

@jobsyu jobsyu mentioned this pull request Jun 18, 2020
@whde whde mentioned this pull request Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fishhook crash on iOS 13.0 beta
6 participants