| Index: third_party/afl/src/libdislocator/libdislocator.so.c
|
| diff --git a/third_party/afl/src/libdislocator/libdislocator.so.c b/third_party/afl/src/libdislocator/libdislocator.so.c
|
| index 1d4648f3ce8ad8b258c7f46e4c8c1413e69347b5..0dfc98e6058a4ab0cb8f5507a82ec05537c598f8 100644
|
| --- a/third_party/afl/src/libdislocator/libdislocator.so.c
|
| +++ b/third_party/afl/src/libdislocator/libdislocator.so.c
|
| @@ -64,7 +64,7 @@
|
| /* Canary & clobber bytes: */
|
|
|
| #define ALLOC_CANARY 0xAACCAACC
|
| -#define ALLOC_CLOBBER 0x41
|
| +#define ALLOC_CLOBBER 0xCC
|
|
|
| #define PTR_C(_p) (((u32*)(_p))[-1])
|
| #define PTR_L(_p) (((u32*)(_p))[-2])
|
| @@ -89,7 +89,8 @@ static void* __dislocator_alloc(size_t len) {
|
|
|
| void* ret;
|
|
|
| - if (total_mem + len > max_mem) {
|
| +
|
| + if (total_mem + len > max_mem || total_mem + len < total_mem) {
|
|
|
| if (hard_fail)
|
| FATAL("total allocs exceed %u MB", max_mem / 1024 / 1024);
|
|
|