浏览代码

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>
Dan Carpenter 12 年之前
父节点
当前提交
876efcf05c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/ath/wcn36xx/debug.c

+ 1 - 1
drivers/net/wireless/ath/wcn36xx/debug.c

@@ -126,7 +126,7 @@ static ssize_t write_file_dump(struct file *file,
 		if (begin == NULL)
 		if (begin == NULL)
 			break;
 			break;
 
 
-		if (kstrtoul(begin, 0, (unsigned long *)(arg + i)) != 0)
+		if (kstrtou32(begin, 0, &arg[i]) != 0)
 			break;
 			break;
 	}
 	}