From 13d11705bf0117365afc3f9210f4d568a2baa69c Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 8 Aug 2005 02:21:55 +0200 Subject: 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 --- udev_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'udev_config.c') 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); -- cgit v1.2.3-54-g00ecf