From: Dan Carpenter Date: Wed, 6 Nov 2013 07:41:28 +0000 (+0300) Subject: wcn36xx: harmless memory corruption bug in debugfs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=876efcf05c3aa582de5efefa7dd6fbb731b4d085;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: John W. Linville --- 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; }