[PATCH] vt6655/wroute: Correct test in ROUTEbRelay()
Roel Kluin
roel.kluin at gmail.com
Fri Oct 16 18:09:38 UTC 2009
uNodeIndex is unsigned, check whether it is within bounds instead.
Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
---
diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c
index ab99161..1d02040 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;
More information about the devel
mailing list