mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length == 0 || length % PAGE_SIZE > 0) {
|
if (length == 0 || (uintptr_t)addr % PAGE_SIZE > 0) {
|
||||||
ret.errno = EINVAL;
|
ret.errno = EINVAL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user