aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2012-10-07 08:27:00 +0100
committerBen Hutchings <ben@decadent.org.uk>2013-01-03 03:33:56 +0000
commitee2ba76aa9424cba511b388b15c141c0f08e9650 (patch)
treee07ca76b2e241148c8fa3c1ed4ddc0f81dfd88ca /drivers
parent926304cc14587e7823af6bb910fbecbda5927325 (diff)
staging: vt6656: [BUG] out of bound array reference in RFbSetPower.
commit ab1dd9963137a1e122004d5378a581bf16ae9bc8 upstream. 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 <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/vt6656/rf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 3fd0478a9a5..8cf0881888b 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -769,6 +769,9 @@ BYTE byPwr = pDevice->byCCKPwr;
return TRUE;
}
+ if (uCH == 0)
+ return -EINVAL;
+
switch (uRATE) {
case RATE_1M:
case RATE_2M: