diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 0f08efc..17ab9c7 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -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;