Kernel: Fix possible page fault on file lookup

This commit is contained in:
Bananymous 2025-11-23 19:49:07 +02:00
parent c72b351bba
commit 3207f5d61f
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ namespace Kernel
{ {
ASSERT(m_process_lock.is_locked()); ASSERT(m_process_lock.is_locked());
if (path[0] == '\0') if (path && path[0] == '\0')
return BAN::Error::from_errno(ENOENT); return BAN::Error::from_errno(ENOENT);
auto relative_parent = TRY(find_relative_parent(fd, path)); auto relative_parent = TRY(find_relative_parent(fd, path));