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.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Malcolm Priestley 2012-10-07 08:27:00 +01:00 committed by Greg Kroah-Hartman
parent 975a1ac9a9
commit ab1dd99631

View file

@ -769,6 +769,9 @@ BYTE byPwr = pDevice->byCCKPwr;
return TRUE;
}
if (uCH == 0)
return -EINVAL;
switch (uRATE) {
case RATE_1M:
case RATE_2M: