diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-04-19 17:22:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-04-19 17:22:31 +0000 |
commit | 0bb362f2dacb98ceff951da08f885ca0daa6c724 (patch) | |
tree | c299adc84ee501ac6a1dbfea8d89bdde1a19258f /usr.bin/rdist/client.c | |
parent | 42885c907f19648763b0c611f78e3017a8fd34dd (diff) |
strcpy/strcat/sprintf removal; krw@ OK
Diffstat (limited to 'usr.bin/rdist/client.c')
-rw-r--r-- | usr.bin/rdist/client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/rdist/client.c b/usr.bin/rdist/client.c index eba72701151..fd9f6ba13b5 100644 --- a/usr.bin/rdist/client.c +++ b/usr.bin/rdist/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.15 2003/04/07 21:13:52 deraadt Exp $ */ +/* $OpenBSD: client.c,v 1.16 2003/04/19 17:22:29 millert Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -39,7 +39,7 @@ static char RCSid[] = "$From: client.c,v 6.80 1996/02/28 20:34:27 mcooper Exp $"; #else static char RCSid[] = -"$OpenBSD: client.c,v 1.15 2003/04/07 21:13:52 deraadt Exp $"; +"$OpenBSD: client.c,v 1.16 2003/04/19 17:22:29 millert Exp $"; #endif static char sccsid[] = "@(#)client.c"; @@ -525,8 +525,8 @@ static int rmchk(opts) * CC_NO -- file exists - DON'T remove. * CC_YES -- file doesn't exist - REMOVE. */ - (void) sprintf(ptarget, "%s%s", - (ptarget[-1] == '/' ? "" : "/"), s); + snprintf(ptarget, target + sizeof(target) - ptarget, + "%s%s", (ptarget[-1] == '/' ? "" : "/"), s); debugmsg(DM_MISC, "check %s\n", target); if (except(target)) (void) sendcmd(CC_NO, NULL); @@ -1215,7 +1215,7 @@ extern int install(src, dest, ddir, destdir, opts) debugmsg(DM_MISC, "%s\n", buff); } - rname = exptilde(target, src); + rname = exptilde(target, src, sizeof(target)); if (rname == NULL) return(-1); ptarget = target; |