diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-10 21:07:15 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-10 21:07:15 +0000 |
commit | dac952ba779c7d98abb2f40fd0e5cb17b44ea8d8 (patch) | |
tree | dddc63f27f9455536267f52154986906ef261f67 /usr.sbin/amd/fsinfo/wr_atab.c | |
parent | d8a53c219e06e22f583c6b2a38a80ca759b8df5b (diff) |
strlcpy, strlcat
Diffstat (limited to 'usr.sbin/amd/fsinfo/wr_atab.c')
-rw-r--r-- | usr.sbin/amd/fsinfo/wr_atab.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/amd/fsinfo/wr_atab.c b/usr.sbin/amd/fsinfo/wr_atab.c index baae2b6105c..15ca7f0cf99 100644 --- a/usr.sbin/amd/fsinfo/wr_atab.c +++ b/usr.sbin/amd/fsinfo/wr_atab.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)wr_atab.c 8.1 (Berkeley) 6/6/93 - * $Id: wr_atab.c,v 1.1 1995/10/18 08:47:19 deraadt Exp $ + * $Id: wr_atab.c,v 1.2 2002/06/10 21:07:14 itojun Exp $ */ #include "../fsinfo/fsinfo.h" @@ -177,12 +177,17 @@ int sk; char sublink[1024]; sublink[0] = '\0'; if (exp_namelen < namelen) { - strcat(sublink, mp->m_name + exp_namelen + 1); + strlcat(sublink, + mp->m_name + exp_namelen + 1, + sizeof(sublink)); if (mvolnlen < volnlen) - strcat(sublink, "/"); + strlcat(sublink, "/", + sizeof(sublink)); } if (mvolnlen < volnlen) - strcat(sublink, ap->a_volname + mvolnlen + 1); + strlcat(sublink, + ap->a_volname + mvolnlen + 1, + sizeof(sublink)); fprintf(af, ";sublink:=%s", sublink); } |