From 3091828c8f4b4a01cbec6025128bf77e6e7b9f97 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 15 May 2015 15:20:51 -0500 Subject: [PATCH] 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 --- os_dep/ioctl_linux.c | 2 ++ 1 file changed, 2 insertions(+) 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;