diff options
Diffstat (limited to 'udevstart.c')
-rw-r--r-- | udevstart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/udevstart.c b/udevstart.c index 19f588ab33..3ecfd4cb61 100644 --- a/udevstart.c +++ b/udevstart.c @@ -228,7 +228,7 @@ static void udev_scan_class(void) continue; snprintf(dirname, MAX_PATHLEN, "%s/%s", SYSCLASS, dent->d_name); - dirname[MAX_PATHLEN] = '\0'; + dirname[MAX_PATHLEN-1] = '\0'; dir2 = opendir(dirname); if (dir2 != NULL) { for (dent2 = readdir(dir2); dent2 != NULL; dent2 = readdir(dir2)) { |