From 8bb7b5cceaaf96a5dd6321d35aae28748896d87b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 22 Aug 2020 19:44:49 +0200 Subject: Added *very* basic polling ipc --- libc/random.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libc/random.c') diff --git a/libc/random.c b/libc/random.c index 7ad8a67..086fa11 100644 --- a/libc/random.c +++ b/libc/random.c @@ -19,6 +19,9 @@ u32 rand() char *randstr(u32 size) { + if (!size) + return NULL; + char *buf = malloc(size + 1); const char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -- cgit v1.2.3