From 820fdbe0722b33ce988d0367880718f8aa7f9c65 Mon Sep 17 00:00:00 2001 From: guoxiaomin <997365648@qq.com> Date: Tue, 11 Aug 2020 11:36:09 +0800 Subject: [PATCH] fixFBRetainCycleDetectorIssues96 --- fishhook.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fishhook.c b/fishhook.c index 026a5c0..4d56a1c 100644 --- a/fishhook.c +++ b/fishhook.c @@ -134,7 +134,9 @@ static void perform_rebinding_with_section(struct rebindings_entry *rebindings, 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]))) { +    indirect_symbol_bindings[i] = cur->rebindings[j].replacement; + } goto symbol_loop; } }