summaryrefslogtreecommitdiffstats
path: root/sys/syscall_untyped.c
diff options
context:
space:
mode:
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);
}