=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rdist/client.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/rdist/client.c 2003/04/05 20:31:58 1.14 --- src/usr.bin/rdist/client.c 2003/04/07 21:13:52 1.15 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.14 2003/04/05 20:31:58 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.15 2003/04/07 21:13:52 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. *************** *** 39,45 **** "$From: client.c,v 6.80 1996/02/28 20:34:27 mcooper Exp $"; #else static char RCSid[] = ! "$OpenBSD: client.c,v 1.14 2003/04/05 20:31:58 deraadt Exp $"; #endif static char sccsid[] = "@(#)client.c"; --- 39,45 ---- "$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 $"; #endif static char sccsid[] = "@(#)client.c"; *************** *** 134,140 **** "%s%s", dest, cp); } } else ! strcpy(lname, dest); debugmsg(DM_MISC, "remfilename: remote filename=%s\n", lname); --- 134,140 ---- "%s%s", dest, cp); } } else ! strlcpy(lname, dest, buf + sizeof buff - lname); debugmsg(DM_MISC, "remfilename: remote filename=%s\n", lname); *************** *** 362,368 **** int destdir; { static char buff[MAXPATHLEN]; - char *lname; /* name of file to link to */ debugmsg(DM_MISC, "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n", --- 362,367 ---- *************** *** 373,385 **** (void) sendcmd(C_RECVHARDLINK, "%o %s %s", opts, lp->pathname, rname); else { ! lname = buff; ! strcpy(lname, remfilename(lp->src, lp->target, ! lp->pathname, rname, ! destdir)); ! debugmsg(DM_MISC, "sendhardlink: lname=%s\n", lname); (void) sendcmd(C_RECVHARDLINK, "%o %s %s", ! opts, lname, rname); } return(response()); --- 372,382 ---- (void) sendcmd(C_RECVHARDLINK, "%o %s %s", opts, lp->pathname, rname); else { ! strlcpy(buff, remfilename(lp->src, lp->target, ! lp->pathname, rname, destdir), sizeof buff); ! debugmsg(DM_MISC, "sendhardlink: lname=%s\n", buff); (void) sendcmd(C_RECVHARDLINK, "%o %s %s", ! opts, buff, rname); } return(response()); *************** *** 1192,1198 **** if (IS_ON(opts, DO_WHOLE)) source[0] = CNULL; else ! (void) strcpy(source, src); if (dest == NULL) { FLAG_OFF(opts, DO_WHOLE); /* WHOLE only useful if renaming */ --- 1189,1195 ---- if (IS_ON(opts, DO_WHOLE)) source[0] = CNULL; else ! (void) strlcpy(source, src, sizeof source); if (dest == NULL) { FLAG_OFF(opts, DO_WHOLE); /* WHOLE only useful if renaming */