summaryrefslogtreecommitdiff
path: root/udev_db.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev_db.c')
-rw-r--r--udev_db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev_db.c b/udev_db.c
index f9adf5c631..ac5a7e6d65 100644
--- a/udev_db.c
+++ b/udev_db.c
@@ -262,7 +262,7 @@ int udev_db_search_name(char *devpath, size_t len, const char *name)
nodename[count-2] = '\0';
dbg("compare '%s' '%s'", nodename, name);
if (strcmp(nodename, name) == 0) {
- memcpy(devpath, &bufline[2], count-2);
+ strlcpy(devpath, nodename, len);
devpath[count-2] = '\0';
file_unmap(buf, bufsize);
closedir(dir);