diff options
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/elf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/elf.c b/src/kernel/elf.c index 07cff91..8113c14 100644 --- a/src/kernel/elf.c +++ b/src/kernel/elf.c @@ -104,6 +104,8 @@ bool try_elf_run(const struct drive *d, const char *path, const char *pass_old_v continue; void *pma = pd_user_allocate(pd, entry->vma, (entry->vms - 1) / 4096 + 1, entry->flags & PH_WRITABLE); fmcpy(pma, d, h, entry->fa, entry->fs); + for (uint8_t *pma_i = pma + entry->fs; pma_i < pma + entry->vms; ++pma_i) + *pma_i = 0; } free_pages(phtable, phtable_pages); |