diff options
Diffstat (limited to 'kernel/features/load.c')
-rw-r--r-- | kernel/features/load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c index b46f772..c5039ed 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -11,7 +11,7 @@ res elf_load(const char *path, struct proc *proc) { - if (!path || !memory_valid(path) || !proc) + if (!memory_valid(path)) return -EFAULT; struct stat s = { 0 }; @@ -30,7 +30,7 @@ res elf_load(const char *path, struct proc *proc) if (read != sizeof(header)) return -ENOEXEC; - strcpy(proc->name, path); + strlcpy(proc->name, path, sizeof(proc->name)); // Valid? u8 *magic = header.ident; |