summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2019-12-17 12:17:19 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2019-12-17 12:17:22 +0900
commitfda5161e30c5364e94a97ee7f7fc3ea7e817fe4b (patch)
tree9c74c6541f098f9190a31b6f2b9d7de164ab9272
parent81b58c5bcbb841e3afb4d0e573c0fc9a62e60cca (diff)
downloadlinux-3.18-exynos7270-fda5161e30c5364e94a97ee7f7fc3ea7e817fe4b.tar.gz
linux-3.18-exynos7270-fda5161e30c5364e94a97ee7f7fc3ea7e817fe4b.tar.bz2
linux-3.18-exynos7270-fda5161e30c5364e94a97ee7f7fc3ea7e817fe4b.zip
net: bcmdhd: Fix sizeof-pointer-memaccess in memcpy usage
There is sizeof-pointer-memaccess warning in memcpy usage because source size is used. Fix it by using destination size explcitly. Change-Id: I2d627ea9bac1e5445cd6e0ae78166c75f5ffd711 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 11258b6acda..eae99c6f35d 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -6290,7 +6290,7 @@ dhd_ethtool(dhd_info_t *dhd, void *uaddr)
/* Copy out any request driver name */
if (copy_from_user(&info, uaddr, sizeof(info)))
return -EFAULT;
- strncpy(drvname, info.driver, sizeof(info.driver));
+ strncpy(drvname, info.driver, sizeof(drvname));
drvname[sizeof(info.driver)-1] = '\0';
/* clear struct for return */