summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-05-28 21:12:43 +0000
committerdelphij <delphij@FreeBSD.org>2009-05-28 21:12:43 +0000
commit9c4052a0284346d8f1b73ca1ea99d7d6c3c2c3e6 (patch)
treebc15802543183fbdef1475d527cbd6339633093e
parent8bb7f959a696a1faa13c049c0471f46f3e88c2fe (diff)
downloadFreeBSD-src-9c4052a0284346d8f1b73ca1ea99d7d6c3c2c3e6.zip
FreeBSD-src-9c4052a0284346d8f1b73ca1ea99d7d6c3c2c3e6.tar.gz
Use strlcpy().
-rw-r--r--sys/compat/svr4/svr4_misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 3fe0909..fbbebb6 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -370,7 +370,7 @@ again:
svr4_dirent.d_off = (svr4_off_t)(off + reclen);
svr4_dirent.d_reclen = (u_short) svr4reclen;
}
- strcpy(svr4_dirent.d_name, bdp->d_name);
+ strlcpy(svr4_dirent.d_name, bdp->d_name, sizeof(svr4_dirent.d_name));
if ((error = copyout((caddr_t)&svr4_dirent, outp, svr4reclen)))
goto out;
inp += reclen;
@@ -511,7 +511,7 @@ again:
idb.d_ino = (svr4_ino_t)bdp->d_fileno;
idb.d_off = (svr4_off_t)off;
idb.d_reclen = (u_short)svr4_reclen;
- strcpy(idb.d_name, bdp->d_name);
+ strlcpy(idb.d_name, bdp->d_name, sizeof(idb.d_name));
if ((error = copyout((caddr_t)&idb, outp, svr4_reclen)))
goto out;
/* advance past this real entry */
OpenPOWER on IntegriCloud