From 3272f0e747a1b9c5305c206d47aab96f7ae5a9c3 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 25 Apr 2001 16:07:47 +0000 Subject: Be more strict with the glibc style malloc implementation. Return NULL when folks do a malloc(0) using malloc-930716. --- libc/stdlib/malloc-930716/malloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/stdlib') diff --git a/libc/stdlib/malloc-930716/malloc.c b/libc/stdlib/malloc-930716/malloc.c index e8f7c7004..88c9251ad 100644 --- a/libc/stdlib/malloc-930716/malloc.c +++ b/libc/stdlib/malloc-930716/malloc.c @@ -127,8 +127,8 @@ malloc (size_t size) if (!initialized && !initialize()) return NULL; - /* Some programs will call malloc (0). We let them pass. */ -#if 0 +#if 1 + /* Some programs will call malloc (0). Lets be strict and return NULL */ if (size == 0) return NULL; #endif -- cgit v1.2.3