summaryrefslogtreecommitdiff
path: root/udev_rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-08-08 02:21:55 +0200
committerKay Sievers <kay.sievers@suse.de>2005-08-08 02:21:55 +0200
commit13d11705bf0117365afc3f9210f4d568a2baa69c (patch)
treeed8d587b482e42072f51190bc8f8edc13e87dba5 /udev_rules.c
parent738428b4499211247dafa394805ecaa2cb313f03 (diff)
switch some strlcpy's to memcpy
strlcpy counts the sourec string lengt and is therefore not suitable to copy a defined length of characters from one string to another. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_rules.c')
-rw-r--r--udev_rules.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/udev_rules.c b/udev_rules.c
index d86b8e8599..d42b219d7d 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -187,7 +187,8 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu
if (bufline[0] == COMMENT_CHARACTER)
continue;
- strlcpy(line, bufline, count+1);
+ memcpy(line, bufline, count);
+ line[count] = '\0';
linepos = line;
if (get_key(&linepos, &variable, &value) == 0) {