From 462be028f18d94ab06c913768da78e30a1a66b68 Mon Sep 17 00:00:00 2001 From: "greg@kroah.com" Date: Fri, 9 Jul 2004 18:46:08 -0700 Subject: [PATCH] [PATCH] fix stupid off-by-one bug that caused udevstart to die on x86-64 boxes. --- udevstart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udevstart.c b/udevstart.c index 19f588ab..3ecfd4cb 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)) { -- 2.39.5