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

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
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment