* [patch] staging: vt6655: check too restrictive (off by one)
@ 2014-01-03 20:59 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-01-03 20:59 UTC (permalink / raw)
To: Forest Bond
Cc: Greg Kroah-Hartman, Joe Perches, Teodora Baluta, David S. Miller,
Bjørn Mork, devel, linux-kernel, kernel-janitors
key_len == MAX_KEY_LEN is valid but we return an error.
Introduced-by: 6b7200fe0a59 ('Staging: vt6655: memory corruption in check in wpa_set_wpadev()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index ee83704e4401..d43efb85f4d3 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -202,8 +202,8 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
int uu, ii;
if (param->u.wpa_key.alg_name > WPA_ALG_CCMP ||
- param->u.wpa_key.key_len >= MAX_KEY_LEN ||
- param->u.wpa_key.seq_len >= MAX_KEY_LEN)
+ param->u.wpa_key.key_len > MAX_KEY_LEN ||
+ param->u.wpa_key.seq_len > MAX_KEY_LEN)
return -EINVAL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "param->u.wpa_key.alg_name = %d \n", param->u.wpa_key.alg_name);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-03 20:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-03 20:59 [patch] staging: vt6655: check too restrictive (off by one) Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox