Skip to content
Snippets Groups Projects
Commit ee93e197 authored by Roel Kluin's avatar Roel Kluin Committed by Greg Kroah-Hartman
Browse files

Staging: vt6655: Correct unsigned bound issue


uNodeIndex is unsigned, check whether it is within bounds instead.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5008c456
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI ...@@ -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 ( ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment