mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
munmap: fix check
This commit is contained in:
@@ -13,7 +13,7 @@ syscallret_t syscall_munmap(context_t *ctx, void *addr, size_t length) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (length == 0 || length % PAGE_SIZE > 0) {
|
||||
if (length == 0 || (uintptr_t)addr % PAGE_SIZE > 0) {
|
||||
ret.errno = EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user