diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-01-03 23:59:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-08 11:02:13 -0800 |
commit | 1c5ebaae42793308870cb38fc81f5217ee49e691 (patch) | |
tree | 83a7181f8de53e1fb7fde23a665b2f6133e35821 /drivers/staging/vt6655 | |
parent | 6e28024e1690bd68e7d19af3c96a1617b08c16ac (diff) | |
download | linux-1c5ebaae42793308870cb38fc81f5217ee49e691.tar.gz linux-1c5ebaae42793308870cb38fc81f5217ee49e691.tar.bz2 linux-1c5ebaae42793308870cb38fc81f5217ee49e691.zip |
staging: vt6655: check too restrictive (off by one)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/wpactl.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |