summaryrefslogtreecommitdiff
path: root/sbin/fsck_msdos
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-30 08:32:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-30 08:32:45 +0000
commitf31b603a20ae64835f3aae0c4b23badb73ca7b39 (patch)
tree71427abc51e78a143e3b32a3ea7ee2e877b80100 /sbin/fsck_msdos
parentb2e36da3ea98bdb6b66a6601dde50aad48d7e5d4 (diff)
snprintf
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 662b2f6ea48..b0555975efb 100644
--- a/sbin/fsck_msdos/dir.c
+++ b/sbin/fsck_msdos/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.16 2003/03/13 09:09:25 deraadt Exp $ */
+/* $OpenBSD: dir.c,v 1.17 2003/03/30 08:31:53 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.16 2003/03/13 09:09:25 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.17 2003/03/30 08:31:53 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -995,7 +995,7 @@ reconnect(dosfs, boot, fat, head)
boot->NumFiles++;
/* Ensure uniqueness of entry here! XXX */
(void)memset(&d, 0, sizeof d);
- sprintf(d.name, "%u", head);
+ snprintf(d.name, sizeof d.name, "%u", head);
d.flags = 0;
d.head = head;
d.size = fat[head].length * boot->ClusterSize;