diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-04-06 08:51:25 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-04-06 08:51:25 +0000 |
commit | a242e80509c7eac07cd487691364a8f3e56c8f64 (patch) | |
tree | 03a1c94ed73df10b9fe45ee6e5769f10b5d5fabb | |
parent | b4b554091d09542655ec20a4662ffdc741e847e3 (diff) |
strcpy/strcat -> strlcpy/strlcat conversion; henning@, tedu@ ok
-rw-r--r-- | sbin/fsck_ext2fs/preen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck_ext2fs/preen.c b/sbin/fsck_ext2fs/preen.c index 408342c268d..d058bd20870 100644 --- a/sbin/fsck_ext2fs/preen.c +++ b/sbin/fsck_ext2fs/preen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: preen.c,v 1.7 2002/05/26 09:24:35 deraadt Exp $ */ +/* $OpenBSD: preen.c,v 1.8 2003/04/06 08:51:24 avsm Exp $ */ /* $NetBSD: preen.c,v 1.2 1997/09/14 14:27:30 lukem Exp $ */ /* @@ -362,9 +362,9 @@ rawname(name) if ((dp = strrchr(name, '/')) == 0) return (0); *dp = 0; - (void)strcpy(rawbuf, name); + (void)strlcpy(rawbuf, name, sizeof(rawbuf)); *dp = '/'; - (void)strcat(rawbuf, "/r"); - (void)strcat(rawbuf, &dp[1]); + (void)strlcat(rawbuf, "/r", sizeof(rawbuf)); + (void)strlcat(rawbuf, &dp[1], sizeof(rawbuf)); return (rawbuf); } |