munmap: fix check

This commit is contained in:
Matheus
2025-12-29 09:51:02 -03:00
parent 1df09b1f05
commit 91e2430d91
+1 -1
View File
@@ -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;
}