summaryrefslogtreecommitdiffstats
path: root/sys/syscall_untyped.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-09-19 20:32:34 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-09-19 20:32:34 -0400
commitb6765812f7da9feccc271e8e0b06f166e8054386 (patch)
treeb4d4b437d6371d103328893acfdf7199efdb850f /sys/syscall_untyped.c
parent50a05d7e173f1d610297219925b146f7ef50eef5 (diff)
downloadjove-kernel-b6765812f7da9feccc271e8e0b06f166e8054386.tar.gz
jove-kernel-b6765812f7da9feccc271e8e0b06f166e8054386.tar.bz2
jove-kernel-b6765812f7da9feccc271e8e0b06f166e8054386.zip
fix bugs with map using untyped obj
Diffstat (limited to 'sys/syscall_untyped.c')
-rw-r--r--sys/syscall_untyped.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/syscall_untyped.c b/sys/syscall_untyped.c
index 975faaa..a5659a6 100644
--- a/sys/syscall_untyped.c
+++ b/sys/syscall_untyped.c
@@ -21,6 +21,11 @@ s_syscall_untyped_split(
jove_owned_obj_t *dst_obj = objdir_getobj(objdir, payload->dest_path, payload->dest_pathlen);
CHECK_OBJTYPE(dst_obj, JOVE_OBJ_NONE, "Destination path is occupied!");
+ if(payload->bytes < JOVE_UNTYPED_MINSIZE) {
+ klogf("Destination untyped would be too small. (%X < %X)\n",
+ payload->bytes, JOVE_UNTYPED_MINSIZE);
+ return EBADARG;
+ }
return untyped_split(target_obj, dst_obj, payload->bytes);
}