From e2075e56f875e077cd5c3d6e3c85368c1087654f Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 22 Aug 2021 15:59:04 +0200 Subject: fs_open() accepts a signed length, fixes an infinite loop it occureed if the path_simplify returned a negative value - instead of being interpreter as an error it just carried on, ending up in an infinite loop. --- src/init/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/init/syscalls.c') diff --git a/src/init/syscalls.c b/src/init/syscalls.c index fb59bd3..0be7917 100644 --- a/src/init/syscalls.c +++ b/src/init/syscalls.c @@ -16,7 +16,7 @@ int _syscall_await(char *buf, int len) { return _syscall(_SYSCALL_AWAIT, (int)buf, (int)len, 0); } -fd_t _syscall_fs_open(const char *path, size_t len) { +fd_t _syscall_fs_open(const char *path, int len) { return _syscall(_SYSCALL_FS_OPEN, (int)path, len, 0); } -- cgit v1.2.3