summaryrefslogtreecommitdiff
path: root/udev_config.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_config.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_config.c')
-rw-r--r--udev_config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/udev_config.c b/udev_config.c
index c57e36cd8c..f0b409b067 100644
--- a/udev_config.c
+++ b/udev_config.c
@@ -137,7 +137,8 @@ static int parse_config_file(void)
if (bufline[0] == COMMENT_CHARACTER)
continue;
- strlcpy(line, bufline, count+1);
+ memcpy(line, bufline, count);
+ line[count] = '\0';
linepos = line;
retval = get_key(&linepos, &variable, &value);