diff options
Diffstat (limited to 'libsysfs/sysfs_driver.c')
-rw-r--r-- | libsysfs/sysfs_driver.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libsysfs/sysfs_driver.c b/libsysfs/sysfs_driver.c index 9ffa9c9077..2439b7a567 100644 --- a/libsysfs/sysfs_driver.c +++ b/libsysfs/sysfs_driver.c @@ -335,14 +335,14 @@ static int get_driver_path(const char *bus, const char *drv, dprintf("Error getting sysfs mount path\n"); return -1; } - safestrncat(path, "/", psize); - safestrncat(path, SYSFS_BUS_NAME, psize); - safestrncat(path, "/", psize); - safestrncat(path, bus, psize); - safestrncat(path, "/", psize); - safestrncat(path, SYSFS_DRIVERS_NAME, psize); - safestrncat(path, "/", psize); - safestrncat(path, drv, psize); + safestrcatmax(path, "/", psize); + safestrcatmax(path, SYSFS_BUS_NAME, psize); + safestrcatmax(path, "/", psize); + safestrcatmax(path, bus, psize); + safestrcatmax(path, "/", psize); + safestrcatmax(path, SYSFS_DRIVERS_NAME, psize); + safestrcatmax(path, "/", psize); + safestrcatmax(path, drv, psize); return 0; } |