]> git.corax.cc Git - corax/commitdiff
kernel/arch: Don't pass uninitialized variables to pg_dir_map() in pg_dir_mmap()
authorMatthias Kruk <m@m10k.eu>
Tue, 5 May 2020 03:07:53 +0000 (12:07 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 5 May 2020 03:07:53 +0000 (12:07 +0900)
kernel/arch/paging.c

index 99069e82a1f864b798d71cea944def7ef55733b8..e02b668638b56d735a72b8b9f88ba961fe27daae 100644 (file)
@@ -1702,6 +1702,8 @@ int pg_dir_mmap(pg_dir_t *pgdir, void *addr, u32_t size,
                /* FIXME: Lock the page directory */
 
                attrs = PAGE_ATTR_PRESENT;
+               vaddr = addr;
+               paddr = NULL;
 
                if(!(prot & PROT_EXEC)) {
                        attrs |= PAGE_ATTR_NO_EXEC;