aboutsummaryrefslogtreecommitdiff
path: root/libc/bionic/malloc_common.cpp
diff options
context:
space:
mode:
authorMitch Phillips <mitchp@google.com>2022-04-21 19:18:20 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-21 19:18:20 +0000
commit99422461a786a6720886c498e6b86063b27342cb (patch)
tree83444dc13350002b184abc67dfe911475f675b7e /libc/bionic/malloc_common.cpp
parenta54e75af38b7cf88f3b32a9e6bc6d8e56e6fafc2 (diff)
parent75011e6012b87b29511b6e02a8c6f76478880723 (diff)
Merge "[GWP-ASan] Provide runtime configuration through an env var + sysprop." am: 3865c8f942 am: a6b526a12d am: 75011e6012
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2038947 Change-Id: Ic80cb0f18a435f12fc1f333f619a3175a57f6d19 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libc/bionic/malloc_common.cpp')
-rw-r--r--libc/bionic/malloc_common.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/malloc_common.cpp b/libc/bionic/malloc_common.cpp
index 38168eeec..9744968fc 100644
--- a/libc/bionic/malloc_common.cpp
+++ b/libc/bionic/malloc_common.cpp
@@ -326,12 +326,12 @@ extern "C" bool android_mallopt(int opcode, void* arg, size_t arg_size) {
return LimitEnable(arg, arg_size);
}
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));
}
errno = ENOTSUP;
return false;