X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=libsysfs%2Fsysfs_device.c;h=290fd9723e2094ea07439901d9d2e7a7b7acd128;hb=b608ade8e4b3df1f2e798dd460ce8ff4e70eb3d9;hp=e3a89770160f90f4c264da4e27af3112d0647e14;hpb=d1fb871d99db38c7704d8e583ff5e0a00e713837;p=elogind.git diff --git a/libsysfs/sysfs_device.c b/libsysfs/sysfs_device.c index e3a897701..290fd9723 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) {