rtl8188eu: On kernel 2.6.32, a NULL dereference was found

This bug was reported and debugged by GitHub user jdowells.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-05-15 15:20:51 -05:00
parent c116500a72
commit 3091828c8f

View file

@ -7859,6 +7859,8 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
memcpy(&wdata, wrq_data, sizeof(wdata));
input_len = wdata.data.length;
if (input_len == 0)
return -EFAULT;
input = rtw_zmalloc(input_len);
if (NULL == input)
return -ENOMEM;