From 5531e2eaaa2fd1dd282dba2fb5bc10e09dfec5e0 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 2 Nov 2024 17:50:40 +0200 Subject: check effective id of create --- src/elf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/elf.c') diff --git a/src/elf.c b/src/elf.c index 23f9b95..85b4b2e 100644 --- a/src/elf.c +++ b/src/elf.c @@ -205,6 +205,8 @@ static vm_t __prepare_proc(struct tcb *t, uint8_t ei_c, vm_t elf, vm_t interp) /* sets up all memory regions etc, returns the entry address */ vm_t load_elf(struct tcb *t, vm_t elf, vm_t interp) { + /** @todo check that all of elf is in memory, theoretically we could be + * passed like half an elf object? */ struct elf_ident *i = (struct elf_ident *)elf; if (i->ei_magic != cpu_to_be32(EI_MAGIC)) return 0; -- cgit v1.3