diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 0602fa21883..297f9ed8f7b 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -201,6 +201,10 @@ static ErrorOr get_required_load_range(OpenFileDescription& p range.end = region_end; }); + // If there's nothing to load, there's nothing to execute + if (range.start == range.end) + return EINVAL; + VERIFY(range.end > range.start); return range; }