summaryrefslogtreecommitdiff
path: root/usr.sbin/amd/fsinfo/wr_atab.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/amd/fsinfo/wr_atab.c')
-rw-r--r--usr.sbin/amd/fsinfo/wr_atab.c13
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);
}