diff --git a/source/ios_exploit.c b/source/ios_exploit.c index bbc45b5..0ed74d2 100644 --- a/source/ios_exploit.c +++ b/source/ios_exploit.c @@ -308,14 +308,20 @@ static void uhs_exploit_init(int dev_uhs_0_handle) { ayylmao[5] = 1; ayylmao[8] = 0x500000; + static_assert(sizeof(second_chain) < 0xF4130000 - 0xF4120000, "second_chain is too big"); memcpy((char *) (0xF4120000), second_chain, sizeof(second_chain)); + static_assert(sizeof(final_chain) < 0xF4140000 - 0xF4130000, "second_chain is too big"); memcpy((char *) (0xF4130000), final_chain, sizeof(final_chain)); + static_assert(sizeof(final_chain) < 0xF4148000 - 0xF4140000, "ios_kernel is too big"); memcpy((char *) (0xF4140000), ios_kernel, sizeof(ios_kernel)); + static_assert(sizeof(ios_usb) < 0xF4160000 - 0xF4148000, "IOS_USB is too big"); payload_info_t *payloads = (payload_info_t *) 0xF4148000; payloads->size = sizeof(ios_usb); memcpy(payloads->data, ios_usb, payloads->size); + + static_assert(sizeof(ios_mcp) < 0xF4170000 - 0xF4160000, "IOS_MCP is too big"); payloads = (payload_info_t *) 0xF4160000; payloads->size = sizeof(ios_mcp); memcpy(payloads->data, ios_mcp, payloads->size);