Skip to content

Commit

Permalink
staging: vt6656: [BUG] out of bound array reference in RFbSetPower.
Browse files Browse the repository at this point in the history
Calling RFbSetPower with uCH zero value will cause out of bound array reference.

This causes 64 bit kernels to oops on boot.

Note: Driver does not function on 64 bit kernels and should be
blacklisted on them.

Signed-off-by: Malcolm Priestley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Malcolm Priestley authored and gregkh committed Oct 22, 2012
1 parent 975a1ac commit ab1dd99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/staging/vt6656/rf.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,9 @@ BYTE byPwr = pDevice->byCCKPwr;
return TRUE;
}

if (uCH == 0)
return -EINVAL;

switch (uRATE) {
case RATE_1M:
case RATE_2M:
Expand Down

0 comments on commit ab1dd99

Please sign in to comment.