diff options
author | David Mendenhall <dpmendenhall@gmail.com> | 2020-04-20 15:00:48 -0700 |
---|---|---|
committer | David Mendenhall <dpmendenhall@gmail.com> | 2020-04-20 15:00:48 -0700 |
commit | 441b64b467e17d62056c3cf7eae9e9a381644db7 (patch) | |
tree | 19c634f1555ff6af5fa9ad09b30cc77f9668cb6d /libdislocator/libdislocator.so.c | |
parent | e6fccdd9c1804e66db13e4b0d5faccc5a83d4116 (diff) | |
download | afl++-441b64b467e17d62056c3cf7eae9e9a381644db7.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; } |