summaryrefslogtreecommitdiff
path: root/libsysfs/sysfs_bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsysfs/sysfs_bus.c')
-rw-r--r--libsysfs/sysfs_bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsysfs/sysfs_bus.c b/libsysfs/sysfs_bus.c
index bff7f78f05..9ca23c85d8 100644
--- a/libsysfs/sysfs_bus.c
+++ b/libsysfs/sysfs_bus.c
@@ -384,7 +384,7 @@ int sysfs_find_driver_bus(const char *driver, char *busname, size_t bsize)
if (drivers != NULL) {
dlist_for_each_data(drivers, curdrv, char) {
if (strcmp(driver, curdrv) == 0) {
- safestrncpy(busname,
+ safestrcpymax(busname,
bus, bsize);
sysfs_close_list(drivers);
sysfs_close_list(buslist);