diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-09-18 21:52:58 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-09-18 21:52:58 +0000 |
commit | fd7f8dbee259adf329ff822098789a5c35fdfb5b (patch) | |
tree | 4cd92ee772888dc2e97e3ed252dcd7e3f69adab1 /sys/dev/ic | |
parent | e405ccd3733ce73acbfc30eda49e7b0287471b8e (diff) |
off by one in check
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/awi_wep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/awi_wep.c b/sys/dev/ic/awi_wep.c index e552ead9f1d..c2b48047898 100644 --- a/sys/dev/ic/awi_wep.c +++ b/sys/dev/ic/awi_wep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: awi_wep.c,v 1.10 2003/09/02 16:58:11 tedu Exp $ */ +/* $OpenBSD: awi_wep.c,v 1.11 2004/09/18 21:52:57 tedu Exp $ */ /* $NetBSD: awi_wep.c,v 1.2 2000/07/04 14:47:58 onoe Exp $ */ /* @@ -256,7 +256,7 @@ awi_wep_setalgo(sc, algo) int ctxlen; awi_crc_init(); /* XXX: not belongs here */ - if (algo < 0 || algo > sizeof(awi_wep_algo)/sizeof(awi_wep_algo[0])) + if (algo < 0 || algo >= sizeof(awi_wep_algo)/sizeof(awi_wep_algo[0])) return EINVAL; awa = &awi_wep_algo[algo]; if (awa->awa_name == NULL) |