summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-09-22 21:39:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-09-22 21:39:41 +0000
commit4085d09b43964c8ebb56763bfe49d52a1ff86b70 (patch)
tree95c7d5b4e6877de37715da57ee17f461d447d792 /usr.bin
parentae364d8ea331da992bd261a9abb64af0b7a0d27f (diff)
Off-by-ones, from aaron@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nc/netcat.c4
-rw-r--r--usr.bin/pmdb/signal.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index 06871179c04..edf26866073 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.62 2003/07/25 21:35:16 millert Exp $ */
+/* $OpenBSD: netcat.c,v 1.63 2003/09/22 21:39:40 miod Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -74,7 +74,7 @@ int zflag; /* Port Scan Flag */
int timeout = -1;
int family = AF_UNSPEC;
-char *portlist[PORT_MAX];
+char *portlist[PORT_MAX+1];
ssize_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
void atelnet(int, unsigned char *, unsigned int);
diff --git a/usr.bin/pmdb/signal.c b/usr.bin/pmdb/signal.c
index 6ed78535514..92f8af0efd4 100644
--- a/usr.bin/pmdb/signal.c
+++ b/usr.bin/pmdb/signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.c,v 1.3 2002/06/26 13:21:25 todd Exp $ */
+/* $OpenBSD: signal.c,v 1.4 2003/09/22 21:39:40 miod Exp $ */
/*
* Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -107,7 +107,7 @@ cmd_signal_ignore(int argc, char **argv, void *arg)
}
l = strtol(signame, &ep, 0);
- if (signame[0] == '\0' || *ep != '\0' || l < 1 || l > NSIG) {
+ if (signame[0] == '\0' || *ep != '\0' || l < 1 || l >= NSIG) {
if (!strncmp("SIG", signame, 3))
signame += 3;
for (signum = 1; signum < NSIG; signum++) {