diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-25 09:10:28 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-25 09:10:28 +0000 |
commit | 651f4c51fa8c4c00e99079a175c86a37e0f365c6 (patch) | |
tree | 4a5586da836a123e79c9458b86501898af6dffe6 | |
parent | 1629f56a1ca9bc121a6ec419395fffcbc62f43b3 (diff) |
fix off by one signal checks. thanks yichen's checker
ok niklas@
-rw-r--r-- | sys/compat/linux/linux_signal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 9115dc93393..96917b0d0c1 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_signal.c,v 1.11 2001/08/09 14:15:22 niklas Exp $ */ +/* $OpenBSD: linux_signal.c,v 1.12 2003/02/25 09:10:27 tedu Exp $ */ /* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */ /* @@ -354,7 +354,7 @@ bsd_to_linux_sigaction(bsa, lsa) int linux_to_bsd_signal(int linuxsig, int *bsdsig) { - if (linuxsig < 0 || linuxsig > LINUX__NSIG) + if (linuxsig < 0 || linuxsig >= LINUX__NSIG) return (EINVAL); *bsdsig = linux_to_bsd_sig[linuxsig]; @@ -364,7 +364,7 @@ linux_to_bsd_signal(int linuxsig, int *bsdsig) int bsd_to_linux_signal(int bsdsig, int *linuxsig) { - if (bsdsig < 0 || bsdsig > NSIG) + if (bsdsig < 0 || bsdsig >= NSIG) return (EINVAL); *linuxsig = bsd_to_linux_sig[bsdsig]; |