mirror of
https://github.com/wiiu-env/MochaPayload.git
synced 2024-11-25 09:16:53 +01:00
Assert the iosu binaries fit in memory
This commit is contained in:
parent
ab360aabe8
commit
224a68531e
@ -308,14 +308,20 @@ static void uhs_exploit_init(int dev_uhs_0_handle) {
|
|||||||
ayylmao[5] = 1;
|
ayylmao[5] = 1;
|
||||||
ayylmao[8] = 0x500000;
|
ayylmao[8] = 0x500000;
|
||||||
|
|
||||||
|
static_assert(sizeof(second_chain) < 0xF4130000 - 0xF4120000, "second_chain is too big");
|
||||||
memcpy((char *) (0xF4120000), second_chain, sizeof(second_chain));
|
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));
|
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));
|
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;
|
payload_info_t *payloads = (payload_info_t *) 0xF4148000;
|
||||||
payloads->size = sizeof(ios_usb);
|
payloads->size = sizeof(ios_usb);
|
||||||
memcpy(payloads->data, ios_usb, payloads->size);
|
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 = (payload_info_t *) 0xF4160000;
|
||||||
payloads->size = sizeof(ios_mcp);
|
payloads->size = sizeof(ios_mcp);
|
||||||
memcpy(payloads->data, ios_mcp, payloads->size);
|
memcpy(payloads->data, ios_mcp, payloads->size);
|
||||||
|
Loading…
Reference in New Issue
Block a user