summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/linux_ipc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index a8c5509..082fec1 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -513,6 +513,8 @@ linux_semop(struct thread *td, struct linux_semop_args *args)
int nsops;
} */ bsd_args;
+ if (args->nsops < 1 || args->semid < 0)
+ return (EINVAL);
bsd_args.semid = args->semid;
bsd_args.sops = PTRIN(args->tsops);
bsd_args.nsops = args->nsops;
OpenPOWER on IntegriCloud