summaryrefslogtreecommitdiff
path: root/libc/bionic/malloc_common_dynamic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/bionic/malloc_common_dynamic.cpp')
-rw-r--r--libc/bionic/malloc_common_dynamic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/malloc_common_dynamic.cpp b/libc/bionic/malloc_common_dynamic.cpp
index 1f58fdaca..6c2f4d941 100644
--- a/libc/bionic/malloc_common_dynamic.cpp
+++ b/libc/bionic/malloc_common_dynamic.cpp
@@ -526,12 +526,12 @@ extern "C" bool android_mallopt(int opcode, void* arg, size_t arg_size) {
return FreeMallocLeakInfo(reinterpret_cast<android_mallopt_leak_info_t*>(arg));
}
if (opcode == M_INITIALIZE_GWP_ASAN) {
- if (arg == nullptr || arg_size != sizeof(bool)) {
+ if (arg == nullptr || arg_size != sizeof(android_mallopt_gwp_asan_options_t)) {
errno = EINVAL;
return false;
}
- return EnableGwpAsan(*reinterpret_cast<bool*>(arg));
+ return EnableGwpAsan(*reinterpret_cast<android_mallopt_gwp_asan_options_t*>(arg));
}
// Try heapprofd's mallopt, as it handles options not covered here.
return HeapprofdMallopt(opcode, arg, arg_size);