summaryrefslogtreecommitdiff
path: root/sbin/fsck_msdos
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 09:09:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 09:09:52 +0000
commitcd64a50f546ecbfd25035373ee745bd04e4e5905 (patch)
tree86a1452cec538b8f5259a45745e95cd1161d04e7 /sbin/fsck_msdos
parent6153e3b8d9aedd43b1300c4d60217039c9485e02 (diff)
lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu
Diffstat (limited to 'sbin/fsck_msdos')
-rw-r--r--sbin/fsck_msdos/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck_msdos/dir.c b/sbin/fsck_msdos/dir.c
index 42f7fc48435..662b2f6ea48 100644
--- a/sbin/fsck_msdos/dir.c
+++ b/sbin/fsck_msdos/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.15 2002/02/17 19:42:27 millert Exp $ */
+/* $OpenBSD: dir.c,v 1.16 2003/03/13 09:09:25 deraadt Exp $ */
/* $NetBSD: dir.c,v 1.11 1997/10/17 11:19:35 ws Exp $ */
/*
@@ -37,7 +37,7 @@
#ifndef lint
-static char rcsid[] = "$OpenBSD: dir.c,v 1.15 2002/02/17 19:42:27 millert Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.16 2003/03/13 09:09:25 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -673,7 +673,7 @@ readDosDirSection(f, boot, fat, dir)
dirent.head |= (p[20] << 16) | (p[21] << 24);
dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24);
if (vallfn) {
- strcpy(dirent.lname, longName);
+ strlcpy(dirent.lname, longName, sizeof dirent.lname);
longName[0] = '\0';
shortSum = -1;
}