aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/fs.c
diff options
context:
space:
mode:
authorMarvin Borner2021-03-14 18:42:54 +0100
committerMarvin Borner2021-03-14 18:42:54 +0100
commit665b00e7f44e5088b134d111ba1d5226c11f0ae8 (patch)
tree49f5a9b0ea82d8c6fd067f5acfbc08607109c0bd /kernel/features/fs.c
parentb7ae466ac77c68d0a1e1a124e6ea8c4cfc8d7100 (diff)
Some security measurements
Diffstat (limited to 'kernel/features/fs.c')
-rw-r--r--kernel/features/fs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/features/fs.c b/kernel/features/fs.c
index c8ad317..c692aac 100644
--- a/kernel/features/fs.c
+++ b/kernel/features/fs.c
@@ -5,6 +5,7 @@
#include <fs.h>
#include <ide.h>
#include <mem.h>
+#include <mm.h>
#include <print.h>
#include <random.h>
#include <str.h>
@@ -240,11 +241,11 @@ s32 vfs_poll(const char **files)
if (!files)
return -1;
- for (const char **p = files; *p && **p; p++)
+ for (const char **p = files; memory_user_valid((u32)*p) && *p && **p; p++)
if (vfs_ready(*p))
return p - files;
- for (const char **p = files; *p && **p; p++)
+ for (const char **p = files; memory_user_valid((u32)*p) && *p && **p; p++)
vfs_wait(*p, (u32)vfs_poll);
return PROC_MAX_WAIT_IDS + 1;