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>
This commit is contained in:
parent
5008c456c1
commit
ee93e1971d
2 changed files with 2 additions and 2 deletions
|
@ -113,7 +113,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDevice->bEnableHostWEP) {
|
if (pDevice->bEnableHostWEP) {
|
||||||
if (uNodeIndex >= 0) {
|
if (uNodeIndex < MAX_NODE_NUM + 1) {
|
||||||
pTransmitKey = &STempKey;
|
pTransmitKey = &STempKey;
|
||||||
pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
|
pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
|
||||||
pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
|
pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
|
||||||
|
|
|
@ -3153,7 +3153,7 @@ bRelayPacketSend (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDevice->bEnableHostWEP) {
|
if (pDevice->bEnableHostWEP) {
|
||||||
if (uNodeIndex >= 0) {
|
if (uNodeIndex < MAX_NODE_NUM + 1) {
|
||||||
pTransmitKey = &STempKey;
|
pTransmitKey = &STempKey;
|
||||||
pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
|
pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
|
||||||
pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
|
pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
|
||||||
|
|
Loading…
Add table
Reference in a new issue