From 53436a571958adaf4164133365513b3eda960a5c Mon Sep 17 00:00:00 2001 From: Gregor Haas Date: Wed, 11 Mar 2020 13:20:40 -0400 Subject: [PATCH] fix a copy/paste bug --- c8_remote/include/dev/types.h | 2 +- c8_remote/src/exploit.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) 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));