diff options
author | 2009-11-11 16:15:06 +0000 | |
---|---|---|
committer | 2009-11-11 16:15:06 +0000 | |
commit | 7c43460d85ad0752ccf1e28376d609a3f03fd6c0 (patch) | |
tree | 0ecff1bb6e9b7b254b31c9cff4ab4524338a07c1 | |
parent | Let ioc(4) pass the information whether it is an onboard device or not, to its (diff) | |
download | wireguard-openbsd-7c43460d85ad0752ccf1e28376d609a3f03fd6c0.tar.xz wireguard-openbsd-7c43460d85ad0752ccf1e28376d609a3f03fd6c0.zip |
incorrect range check, > vs >=, on the error list, spotted by parfait
ok otto jsg
-rw-r--r-- | bin/csh/error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/csh/error.c b/bin/csh/error.c index 3c6239257e5..fe21b4935a0 100644 --- a/bin/csh/error.c +++ b/bin/csh/error.c @@ -1,4 +1,4 @@ -/* $OpenBSD: error.c,v 1.9 2009/10/27 23:59:21 deraadt Exp $ */ +/* $OpenBSD: error.c,v 1.10 2009/11/11 16:15:06 deraadt Exp $ */ /* $NetBSD: err.c,v 1.6 1995/03/21 09:02:47 cgd Exp $ */ /*- @@ -323,7 +323,7 @@ stderror(int id, ...) if ((flags & ERR_OLD) && seterr == NULL) return; - if (id < 0 || id > sizeof(errorlist) / sizeof(errorlist[0])) + if (id < 0 || id >= sizeof(errorlist) / sizeof(errorlist[0])) id = ERR_INVALID; (void) fflush(cshout); |