Fix off-by-one error in array bounds check.

This commit is contained in:
Poul-Henning Kamp 2003-09-05 11:09:26 +00:00
parent bc7c831fc7
commit 9aad651f23
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119764

View file

@ -240,7 +240,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)