diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-10-16 20:17:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 12:23:16 -0800 |
commit | ee93e1971dc2dbc3133962b3d914b18d7c93a681 (patch) | |
tree | 4b9dff62c659dabf87bea5989e4e68b382eeae79 | |
parent | 5008c456c1cdcb8ef7265dcb6d20317f54d3e8ee (diff) |
Staging: vt6655: Correct unsigned bound issue
uNodeIndex is unsigned, check whether it is within bounds instead.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/vt6655/wroute.c | 2 | ||||
-rw-r--r-- | drivers/staging/vt6656/rxtx.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c index ab991618a29..1d02040e80e 100644 --- a/drivers/staging/vt6655/wroute.c +++ b/drivers/staging/vt6655/wroute.c @@ -113,7 +113,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI } if (pDevice->bEnableHostWEP) { - if (uNodeIndex >= 0) { + if (uNodeIndex < MAX_NODE_NUM + 1) { pTransmitKey = &STempKey; pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite; pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex; diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 94ddf8bab62..d9fa36c9523 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -3153,7 +3153,7 @@ bRelayPacketSend ( } if (pDevice->bEnableHostWEP) { - if (uNodeIndex >= 0) { + if (uNodeIndex < MAX_NODE_NUM + 1) { pTransmitKey = &STempKey; pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite; pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex; |