From 52a2349f13ab2da84a31680fbdab1ddf5dc103a2 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 14 Apr 2003 03:14:18 +0000 Subject: strlcpy, obvious --- usr.sbin/ppp/pppctl/pppctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/ppp/pppctl') diff --git a/usr.sbin/ppp/pppctl/pppctl.c b/usr.sbin/ppp/pppctl/pppctl.c index fd35621ecfc..fb773c50548 100644 --- a/usr.sbin/ppp/pppctl/pppctl.c +++ b/usr.sbin/ppp/pppctl/pppctl.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pppctl.c,v 1.11 2003/04/04 20:28:57 deraadt Exp $ + * $Id: pppctl.c,v 1.12 2003/04/14 03:14:17 deraadt Exp $ */ #include @@ -380,7 +380,7 @@ main(int argc, char **argv) Command[sizeof(Command)-1] = '\0'; for (arg++; arg < argc; arg++) { if (len && len < sizeof(Command)-1) { - strcpy(Command+len, " "); + strlcpy(Command+len, " ", sizeof Command - len); len++; } strncpy(Command+len, argv[arg], sizeof(Command)-len-1); -- cgit v1.2.3