Module Name:    src
Committed By:   dholland
Date:           Sun Mar 23 05:39:32 UTC 2014

Modified Files:
        src/sbin/fsck_lfs: inode.c

Log Message:
don't use sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sbin/fsck_lfs/inode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_lfs/inode.c
diff -u src/sbin/fsck_lfs/inode.c:1.51 src/sbin/fsck_lfs/inode.c:1.52
--- src/sbin/fsck_lfs/inode.c:1.51	Tue Jun 18 18:18:58 2013
+++ src/sbin/fsck_lfs/inode.c	Sun Mar 23 05:39:32 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.51 2013/06/18 18:18:58 christos Exp $	 */
+/* $NetBSD: inode.c,v 1.52 2014/03/23 05:39:32 dholland Exp $	 */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -259,7 +259,8 @@ iblock(struct inodesc *idesc, long ileve
 		for (ap = ((ulfs_daddr_t *) bp->b_data) + nif; ap < aplim; ap++) {
 			if (*ap == 0)
 				continue;
-			(void) sprintf(buf, "PARTIALLY TRUNCATED INODE I=%llu",
+			(void)snprintf(buf, sizeof(buf),
+			    "PARTIALLY TRUNCATED INODE I=%llu",
 			    (unsigned long long)idesc->id_number);
 			if (dofix(idesc, buf)) {
 				*ap = 0;

Reply via email to