From ce98400f8a9ebd4e62e76b9e292b7598d0d66cc0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 2 Apr 2021 23:26:28 +0200 Subject: Added kernel section clear/protect after init This is a huge security improvement as it prevents potential exploits of using or modifying internal kernel functions or data. --- libs/libc/random.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/libc/random.c') diff --git a/libs/libc/random.c b/libs/libc/random.c index 5cbbbb6..6e65959 100644 --- a/libs/libc/random.c +++ b/libs/libc/random.c @@ -1,10 +1,13 @@ // MIT License, Copyright (c) 2020 Marvin Borner -#include #include #include #include +#ifdef KERNEL +#include +#endif + static u32 g_seed = 1; void srand(u32 seed) -- cgit v1.2.3