summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-11-06 10:41:28 +0300
committerJohn W. Linville <linville@tuxdriver.com>2013-11-11 14:42:46 -0500
commit876efcf05c3aa582de5efefa7dd6fbb731b4d085 (patch)
tree1955228ec145495d4f5939e858f2a0924f0ba749 /drivers
parent8d93f1f309d38b65fce0b9f0de91ba6c96990c07 (diff)
downloadlinux-876efcf05c3aa582de5efefa7dd6fbb731b4d085.tar.gz
linux-876efcf05c3aa582de5efefa7dd6fbb731b4d085.tar.bz2
linux-876efcf05c3aa582de5efefa7dd6fbb731b4d085.zip
wcn36xx: harmless memory corruption bug in debugfs
On 64 bit systems we write past the end of the arg[] array. Fixes: 8e84c2582169 ('wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/debug.c b/drivers/net/wireless/ath/wcn36xx/debug.c
index 5b84f7ae0b1e..ef44a2da644d 100644
--- a/drivers/net/wireless/ath/wcn36xx/debug.c
+++ b/drivers/net/wireless/ath/wcn36xx/debug.c
@@ -126,7 +126,7 @@ static ssize_t write_file_dump(struct file *file,
if (begin == NULL)
break;
- if (kstrtoul(begin, 0, (unsigned long *)(arg + i)) != 0)
+ if (kstrtou32(begin, 0, &arg[i]) != 0)
break;
}