diff --git a/c8_remote/include/dev/types.h b/c8_remote/include/dev/types.h index 22e58f5..1d12587 100644 --- a/c8_remote/include/dev/types.h +++ b/c8_remote/include/dev/types.h @@ -30,7 +30,7 @@ struct heap_header unsigned long long pad_start; unsigned long long pad_end; -} header; +} __attribute__ ((packed)); struct bern_data { diff --git a/c8_remote/src/exploit.c b/c8_remote/src/exploit.c index 4771d82..92065d4 100644 --- a/c8_remote/src/exploit.c +++ b/c8_remote/src/exploit.c @@ -401,6 +401,7 @@ int fix_heap(struct pwned_device *dev) struct heap_header block; struct dev_cmd_resp *resp; + unsigned long long curr = ADDR_HEAP_BASE; unsigned long long calc_args[5]; int ret, i; @@ -440,11 +441,6 @@ int fix_heap(struct pwned_device *dev) } } - calc_args[0] = ADDR_CHECK_ALL_CHKSUMS; - dev_exec(dev, 0, 1, calc_args); - calc_args[0] = ADDR_CALC_CHKSUM; - - unsigned long long curr = ADDR_HEAP_BASE; while(1) { resp = dev_read_memory(dev, curr, sizeof(struct heap_header));