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

fixed iOS 15 Crash #123

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion rcd_fishhook/rcd_fishhook.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ static void rcd_perform_rebinding_with_section(struct rcd_rebindings_entry *rebi
indirect_symbol_bindings[i] != cur->rebindings[j].replacement) {
*(cur->rebindings[j].replaced) = indirect_symbol_bindings[i];
}
indirect_symbol_bindings[i] = cur->rebindings[j].replacement;
if (i < (sizeof(indirect_symbol_bindings) / sizeof(indirect_symbol_bindings[0]))) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused how this works. Sorry if I'm being dumb. sizeof(indirect_symbol_bindings) is sizeof(void**) and sizeof(indirect_symbol_bindings[0]) is sizeof(void*) so this is equivalent to if (i < 1) isn't it?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect -Wsizeof-pointer-div would flag this for you?

indirect_symbol_bindings[i] = cur->rebindings[j].replacement;
}
goto symbol_loop;
}
}
Expand Down