Skip to content

Commit

Permalink
Staging: vt6655: Correct unsigned bound issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 5008c45 commit ee93e19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/vt6655/wroute.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/vt6656/rxtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee93e19

Please sign in to comment.