提交 b0c5881e 编写于 作者: M Malcolm Priestley 提交者: Greg Kroah-Hartman

staging: vt6655: Fix RFbSetPower() error: buffer overflow 'priv->abyCCKPwrTbl' 15 <= 56

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: NDan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 918185f6
...@@ -788,6 +788,9 @@ bool RFbSetPower( ...@@ -788,6 +788,9 @@ bool RFbSetPower(
case RATE_2M: case RATE_2M:
case RATE_5M: case RATE_5M:
case RATE_11M: case RATE_11M:
if (uCH > CB_MAX_CHANNEL_24G)
return false;
byPwr = priv->abyCCKPwrTbl[uCH]; byPwr = priv->abyCCKPwrTbl[uCH];
byPwrdBm = priv->abyCCKDefaultPwr[uCH]; byPwrdBm = priv->abyCCKDefaultPwr[uCH];
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册