diff options
author | Marvin Borner | 2020-08-23 12:19:20 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-23 12:19:20 +0200 |
commit | b1faf9042c5104d7dafc7d880817def934086ddb (patch) | |
tree | 4abe87a6d83aaad17eebd291f2fe046e6a1324a6 /kernel/features/load.c | |
parent | b667ea0fbd26af222f828199e7b9a7e62ad98081 (diff) |
How did this work before?!
I used r->eax instead of r->ebx in malloc :O
Diffstat (limited to 'kernel/features/load.c')
-rw-r--r-- | kernel/features/load.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c index 8aa28b8..d5dd839 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -52,7 +52,7 @@ void elf_load(char *path, struct proc *proc) if (phdr->type != PT_LOAD) continue; memcpy((void *)phdr->vaddr, h + phdr->offset, phdr->filesz); - memset((void *)(phdr->vaddr + phdr->filesz), phdr->memsz - phdr->filesz, 0); + memset((void *)(phdr->vaddr + phdr->filesz), 0, phdr->memsz - phdr->filesz); } u32 stack = (u32)malloc(0x1000) + 0x1000; |