Make sure InterpreterPath has \0 character by default

This commit is contained in:
Alex 2023-05-04 02:39:13 +03:00
parent 61aea6aa8d
commit d7427ff2fa
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ namespace Execute
void *ElfFile = KernelAllocator.RequestPages(TO_PAGES(ExFileSize + 1));
/* Copy the file to the allocated memory */
memcpy(ElfFile, (void *)ExFile.node->Address, ExFileSize);
debug("Image Size: %#lx - %#lx (length: %ld)", ElfFile, (uintptr_t)ElfFile + ExFileSize, ExFileSize);
debug("Elf file: %#lx - %#lx (length: %ld)", ElfFile, (uintptr_t)ElfFile + ExFileSize, ExFileSize);
Elf64_Ehdr *ELFHeader = (Elf64_Ehdr *)ElfFile;

View File

@ -107,7 +107,7 @@ namespace Execute
if (ItrPhdr.p_vaddr == 0)
EntryPoint += (uintptr_t)MemoryImage.Virtual;
char InterpreterPath[256];
char InterpreterPath[256] = {'\0'};
for (Elf64_Half i = 0; i < ELFHeader->e_phnum; i++)
{