Message ID | 1421691855-2927-5-git-send-email-tvboxspy@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 27841aa..a6eabde 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -788,6 +788,9 @@ bool RFbSetPower( case RATE_2M: case RATE_5M: case RATE_11M: + if (uCH > CB_MAX_CHANNEL_24G) + return false; + byPwr = priv->abyCCKPwrTbl[uCH]; byPwrdBm = priv->abyCCKDefaultPwr[uCH]; break;
Check uCH is not more than CB_MAX_CHANNEL_24G(14) on rates RATE_1M to RATE_11M Return false as the call is invalid as these rates do not exist above channel 14. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> --- drivers/staging/vt6655/rf.c | 3 +++ 1 file changed, 3 insertions(+)