summaryrefslogtreecommitdiff
path: root/udevtrigger.c
diff options
context:
space:
mode:
Diffstat (limited to 'udevtrigger.c')
-rw-r--r--udevtrigger.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/udevtrigger.c b/udevtrigger.c
index cf8f209b1c..309c54ab68 100644
--- a/udevtrigger.c
+++ b/udevtrigger.c
@@ -435,6 +435,8 @@ static void scan_failed(void)
continue;
start = strlcpy(device, sysfs_path, sizeof(device));
+ if(start >= sizeof(device))
+ start = sizeof(device) - 1;
strlcat(device, dent->d_name, sizeof(device));
path_decode(&device[start]);
device_list_insert(device);