diff options
author | David Mendenhall <dpmendenhall@gmail.com> | 2020-04-20 15:00:48 -0700 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-04-21 13:14:34 +0200 |
commit | 0aef3b40403848d6a86fca56b0bf520b1851c1d0 (patch) | |
tree | bf65624dc8c21f3c269ab2d1821451197cbf595f /libdislocator/libdislocator.so.c | |
parent | 4cc0589440465e1f67218361a6f6e3a91a78a6a8 (diff) | |
download | afl++-0aef3b40403848d6a86fca56b0bf520b1851c1d0.tar.gz |
add NULL check to malloc_usable_size
Diffstat (limited to 'libdislocator/libdislocator.so.c')
-rw-r--r-- | libdislocator/libdislocator.so.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c index 72d280e6..19e84d9f 100644 --- a/libdislocator/libdislocator.so.c +++ b/libdislocator/libdislocator.so.c @@ -466,7 +466,7 @@ void *reallocarray(void *ptr, size_t elem_len, size_t elem_cnt) { size_t malloc_usable_size(void *ptr) { - return PTR_L(ptr); + return ptr ? PTR_L(ptr) : 0; } |