提交 cd922740 编写于 作者: X Xiaochen Wang 提交者: Greg Kroah-Hartman

staging: rtl8712: check copy_from_user return value

Description:return -EFAULT if copy_to_user() fails
Signed-off-by: NXiaochen Wang <wangxiaochen0@gmail.com>
Acked-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 9603ff50
...@@ -1970,9 +1970,9 @@ static int r871x_wps_start(struct net_device *dev, ...@@ -1970,9 +1970,9 @@ static int r871x_wps_start(struct net_device *dev,
struct _adapter *padapter = (struct _adapter *)_netdev_priv(dev); struct _adapter *padapter = (struct _adapter *)_netdev_priv(dev);
struct iw_point *pdata = &wrqu->data; struct iw_point *pdata = &wrqu->data;
u32 u32wps_start = 0; u32 u32wps_start = 0;
unsigned int uintRet = 0;
uintRet = copy_from_user((void *)&u32wps_start, pdata->pointer, 4); if (copy_from_user((void *)&u32wps_start, pdata->pointer, 4))
return -EFAULT;
if ((padapter->bDriverStopped) || (pdata == NULL)) if ((padapter->bDriverStopped) || (pdata == NULL))
return -EINVAL; return -EINVAL;
if (u32wps_start == 0) if (u32wps_start == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册