projects
/
sdk
/
emulator
/
emulator-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4f74d3
)
drivers/net/wireless/iwlegacy: use strlcpy instead of strncpy
author
Chen Gang
<gang.chen@asianux.com>
Mon, 7 Jan 2013 04:42:46 +0000
(12:42 +0800)
committer
John W. Linville
<linville@tuxdriver.com>
Mon, 7 Jan 2013 19:34:45 +0000
(14:34 -0500)
The fields must be null-terminated, or simple_strtoul will cause issue.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/3945-mac.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/iwlegacy/3945-mac.c
b/drivers/net/wireless/iwlegacy/3945-mac.c
index d604b4036a764358e52bd2c2ca9d02bd24f14ce9..3726cd6fcd754812d65cb38d89782e96aace0de8 100644
(file)
--- a/
drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/
drivers/net/wireless/iwlegacy/3945-mac.c
@@
-3273,7
+3273,7
@@
il3945_store_measurement(struct device *d, struct device_attribute *attr,
if (count) {
char *p = buffer;
- str
ncpy(buffer, buf, min(sizeof(buffer), count
));
+ str
lcpy(buffer, buf, sizeof(buffer
));
channel = simple_strtoul(p, NULL, 0);
if (channel)
params.channel = channel;