From cfbc3d559bff5c2cc933ff7c3d56a386ef5b9a4b Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 6 May 2003 21:43:27 +0000 Subject: string cleaning; tedu ok --- sys/miscfs/fdesc/fdesc_vnops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/miscfs/fdesc') diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index 1e96dc206d3..039a9e2b7c8 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdesc_vnops.c,v 1.33 2003/01/31 17:37:50 art Exp $ */ +/* $OpenBSD: fdesc_vnops.c,v 1.34 2003/05/06 21:43:26 deraadt Exp $ */ /* $NetBSD: fdesc_vnops.c,v 1.32 1996/04/11 11:24:29 mrg Exp $ */ /* @@ -710,7 +710,8 @@ fdesc_readdir(v) if (fd_getfile(fdp, i - 2) == NULL) continue; d.d_fileno = i - 2 + FD_STDIN; - d.d_namlen = sprintf(d.d_name, "%d", i - 2); + d.d_namlen = snprintf(d.d_name, sizeof d.d_name, + "%d", i - 2); d.d_type = DT_UNKNOWN; break; } -- cgit v1.2.3