musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--src/malloc/oldmalloc/aligned_alloc.c 3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/malloc/oldmalloc/aligned_alloc.c b/src/malloc/oldmalloc/aligned_alloc.c
index e06c76ed..4adca3b4 100644
--- a/src/malloc/oldmalloc/aligned_alloc.c
+++ b/src/malloc/oldmalloc/aligned_alloc.c
@@ -12,7 +12,8 @@ void *aligned_alloc(size_t align, size_t len)
return 0;
}
- if (len > SIZE_MAX - align || __malloc_replaced) {
+ if (len > SIZE_MAX - align ||
+ (__malloc_replaced && !__aligned_alloc_replaced)) {
errno = ENOMEM;
return 0;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年11月07日 04:02:59 +0000

AltStyle によって変換されたページ (->オリジナル) /