diff options
Diffstat (limited to 'udev_rules.c')
-rw-r--r-- | udev_rules.c | 3 |
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) { |