Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 407ee237 authored by Chen Gang's avatar Chen Gang Committed by John W. Linville
Browse files

drivers/net/wireless/iwlegacy: use strlcpy instead of strncpy



  The fields must be null-terminated, or simple_strtoul will cause issue.

Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c4f74d35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3273,7 +3273,7 @@ il3945_store_measurement(struct device *d, struct device_attribute *attr,

	if (count) {
		char *p = buffer;
		strncpy(buffer, buf, min(sizeof(buffer), count));
		strlcpy(buffer, buf, sizeof(buffer));
		channel = simple_strtoul(p, NULL, 0);
		if (channel)
			params.channel = channel;