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; } }