From 960c1264ff3c6074d6ec91439eff9afd4640e56c Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Thu, 2 Mar 2000 13:52:52 +0000 Subject: [PATCH] Small fix... --- dump/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dump/main.c b/dump/main.c index 6addbb4..cd844ae 100644 --- a/dump/main.c +++ b/dump/main.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.19 2000/03/02 13:33:00 stelian Exp $"; + "$Id: main.c,v 1.20 2000/03/02 13:52:52 stelian Exp $"; #endif /* not lint */ #include @@ -288,7 +288,7 @@ main(int argc, char *argv[]) exit(X_STARTUP); } disk = *argv++; - if (strlen(disk) > MAXPATHLEN) { + if (strlen(disk) >= MAXPATHLEN) { (void)fprintf(stderr, "Disk or filesystem name too long: %s\n", disk); exit(X_STARTUP); } @@ -393,7 +393,7 @@ main(int argc, char *argv[]) if (dt != NULL) { char name[MAXPATHLEN]; (void)strncpy(spcl.c_dev, dt->fs_spec, NAMELEN); - (void)sprintf(name, "%s (dir %s)", + (void)snprintf(name, sizeof(name), "%s (dir %s)", dt->fs_file, directory); (void)strncpy(spcl.c_filesys, name, NAMELEN); disk = rawname(dt->fs_spec); -- 2.39.5