summaryrefslogtreecommitdiff
path: root/libsysfs/sysfs_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsysfs/sysfs_device.c')
-rw-r--r--libsysfs/sysfs_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsysfs/sysfs_device.c b/libsysfs/sysfs_device.c
index e3a8977016..290fd9723e 100644
--- a/libsysfs/sysfs_device.c
+++ b/libsysfs/sysfs_device.c
@@ -53,7 +53,7 @@ static int get_dev_driver(struct sysfs_device *dev)
if (c == NULL)
return 1;
*c = '\0';
- safestrncat(c, path, (sizeof(devpath) - strlen(devpath)));
+ safestrcatmax(c, path, (sizeof(devpath) - strlen(devpath)));
drvlist = sysfs_open_subsystem_list(path);
if (drvlist != NULL) {