Skip to contentSkip to conversation

staging: vt6656: [BUG] out of bound array reference in RFbSetPower.

PATCH New Malcolm Priestley 1 participant 1 message Oct 7, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6656: [BUG] out of bound array reference in RFbSetPower.

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.

---
 drivers/staging/vt6656/rf.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/staging/vt6656/rf.c +3 -0
index 3fd0478..8cf0881 100644
@@ -769,6 +769,9 @@ BYTE    byPwr = pDevice->byCCKPwr;
         return TRUE;
     }
 
+	if (uCH == 0)
+		return -EINVAL;
+
     switch (uRATE) {
     case RATE_1M:
     case RATE_2M:
Signature · 1 line
1.7.10.4