diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-10-11 09:55:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-22 13:26:40 -0700 |
commit | c25015c1184e7e54c02e0dfd5044eec38dec482c (patch) | |
tree | 8d2158d00b6c10e6dcf2ec6083e6562ebca97c84 /drivers/staging/vt6655 | |
parent | ff4573a7afc53ccf6c66622b884d60208d04db2b (diff) | |
download | op-kernel-dev-c25015c1184e7e54c02e0dfd5044eec38dec482c.zip op-kernel-dev-c25015c1184e7e54c02e0dfd5044eec38dec482c.tar.gz |
Staging: vt6655-6: shift wrap in hostap_set_encryption()
abySeq is an unsigned char so shifting more than 31 bits will lead to a
shift wrapping bug.
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/hostap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 67b1b88..5f13890 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -596,9 +596,9 @@ static int hostap_set_encryption(PSDevice pDevice, if (param->u.crypt.seq) { memcpy(&abySeq, param->u.crypt.seq, 8); - for (ii = 0 ; ii < 8 ; ii++) { - KeyRSC |= (abySeq[ii] << (ii * 8)); - } + for (ii = 0 ; ii < 8 ; ii++) + KeyRSC |= (unsigned long)abySeq[ii] << (ii * 8); + dwKeyIndex |= 1 << 29; pMgmt->sNodeDBTable[iNodeIndex].KeyRSC = KeyRSC; } |