diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-05-06 21:43:27 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-05-06 21:43:27 +0000 |
commit | cfbc3d559bff5c2cc933ff7c3d56a386ef5b9a4b (patch) | |
tree | 532c820c12d4deb6ad91a0f988f864837d51b1d3 | |
parent | 00ed84ae72172c64514620c0c25d98604c44cc5b (diff) |
string cleaning; tedu ok
-rw-r--r-- | sys/miscfs/fdesc/fdesc_vnops.c | 5 | ||||
-rw-r--r-- | sys/nfs/nfs_vnops.c | 5 |
2 files changed, 6 insertions, 4 deletions
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; } diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index bc9f53d8291..50c51708ba9 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.53 2003/01/31 17:37:50 art Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.54 2003/05/06 21:43:26 deraadt Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -2481,7 +2481,8 @@ nfs_sillyrename(dvp, vp, cnp) } /* Fudge together a funny name */ - sp->s_namlen = sprintf(sp->s_name, ".nfsA%05x4.4", cnp->cn_proc->p_pid); + sp->s_namlen = snprintf(sp->s_name, sizeof sp->s_name, + ".nfsA%05x4.4", cnp->cn_proc->p_pid); /* Try lookitups until we get one that isn't there */ while (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred, |