diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-30 22:27:21 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-30 22:27:21 +0000 |
commit | 5fa8930468f5ec5d64ce160e40caf7f779ce617d (patch) | |
tree | 59a66296a24ffc9aa17360fc43cff6f311a29953 /libexec/tcpd/tcpdchk/scaffold.c | |
parent | 19e5f24389a9326c16000b001ba2ad4d7840282a (diff) |
some snprintf and strlcpy
Diffstat (limited to 'libexec/tcpd/tcpdchk/scaffold.c')
-rw-r--r-- | libexec/tcpd/tcpdchk/scaffold.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/tcpd/tcpdchk/scaffold.c b/libexec/tcpd/tcpdchk/scaffold.c index 582cea1d173..da0467d383b 100644 --- a/libexec/tcpd/tcpdchk/scaffold.c +++ b/libexec/tcpd/tcpdchk/scaffold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scaffold.c,v 1.6 2002/06/07 03:32:04 itojun Exp $ */ +/* $OpenBSD: scaffold.c,v 1.7 2002/07/30 22:27:20 deraadt Exp $ */ /* * Routines for testing only. Not really industrial strength. @@ -10,7 +10,7 @@ #if 0 static char sccs_id[] = "@(#) scaffold.c 1.5 95/01/03 09:13:48"; #else -static char rcsid[] = "$OpenBSD: scaffold.c,v 1.6 2002/06/07 03:32:04 itojun Exp $"; +static char rcsid[] = "$OpenBSD: scaffold.c,v 1.7 2002/07/30 22:27:20 deraadt Exp $"; #endif #endif @@ -159,7 +159,7 @@ struct stat *st; if (st->st_mode & 002) tcpd_warn("%s: world writable", path); if (path[0] == '/' && path[1] != 0) { - strrchr(strcpy(buf, path), '/')[0] = 0; + strrchr((strlcpy(buf, path, sizeof buf), buf), '/')[0] = 0; (void) check_path(buf[0] ? buf : "/", &stbuf); } return (0); |