summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-07-09 18:46:08 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:36:59 -0700
commit462be028f18d94ab06c913768da78e30a1a66b68 (patch)
tree9b0304761921fac98f2525eac8686f1eb26181a8
parentbf21ea08b3f7b2a93141d98448c78bc3dbe87f84 (diff)
[PATCH] fix stupid off-by-one bug that caused udevstart to die on x86-64 boxes.
-rw-r--r--udevstart.c2
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)) {