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
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/malloc/__simple_malloc.c 1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/malloc/__simple_malloc.c b/src/malloc/__simple_malloc.c
index 61cd9fc4..c029342c 100644
--- a/src/malloc/__simple_malloc.c
+++ b/src/malloc/__simple_malloc.c
@@ -15,6 +15,7 @@ void *__simple_malloc(size_t n)
static int lock;
size_t align=1;
+ if (!n) return 0;
if (n > SIZE_MAX/2) goto toobig;
while (align<n && align<ALIGN)
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月18日 19:23:48 +0000

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