qcacld-3.0: Resolve out of bound memory access, while processing setpno

propagation from qcacld-2.0 to qcacld-3.0.

While processing setpno ioctl, there is an out of bound memory
issue when Host is copying ioctl arguments to a local buffer.

While copying ioctl arguments, make sure valid indices are used.

Change-Id: I03078df7135f5f1daf1d9bead7d4410e58fb848a
CRs-Fixed: 1112355
This commit is contained in:
Hanumanth Reddy Pothula
2017-01-19 13:41:29 +05:30
committed by snandini
parent d94d513dec
commit 30645a805e

View File

@@ -12212,7 +12212,6 @@ static int __iw_set_pno(struct net_device *dev,
return -EINVAL;
}
qdf_mem_copy(data, extra, (len-1));
data[len] = '\0';
ptr = data;
if (1 != sscanf(ptr, " %hhu %n", &value, &offset)) {