aboutsummaryrefslogtreecommitdiff
path: root/libc/bionic/malloc_common.cpp
diff options
context:
space:
mode:
authorMitch Phillips <mitchp@google.com>2022-04-21 18:32:16 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-21 18:32:16 +0000
commita6b526a12dcd3e979c986da1fa59b1f8e4aac24d (patch)
tree83444dc13350002b184abc67dfe911475f675b7e /libc/bionic/malloc_common.cpp
parent6e6e90fb9a0028b897c1984e3a2239352d92bf8d (diff)
parent3865c8f942ca7e8cbf9de56741edce8a97a865b1 (diff)
downloadbionic-a6b526a12dcd3e979c986da1fa59b1f8e4aac24d.tar.gz
Merge "[GWP-ASan] Provide runtime configuration through an env var + sysprop." am: 3865c8f942
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2038947 Change-Id: I3f3eed666954ca496c52ed24824e89e9cab45c2c 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;