From e78ea23712a355264aaec7a543a6cdea173870ea Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 8 Feb 2017 17:47:36 +0000 Subject: [PATCH] Use strncpy here because we need to be portable, and we have the +1 byte to save us :-) --- usr.bin/make/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index c2d4a7939b47..308c39022f10 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.256 2017/02/07 21:16:31 christos Exp $ */ +/* $NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.256 2017/02/07 21:16:31 christos Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.256 2017/02/07 21:16:31 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $"); #endif #endif /* not lint */ #endif @@ -449,7 +449,7 @@ rearg: stat(curdir, &sb) != -1 && sa.st_ino == sb.st_ino && sa.st_dev == sb.st_dev) - strlcpy(curdir, argvalue, MAXPATHLEN); + strncpy(curdir, argvalue, MAXPATHLEN); ignorePWD = TRUE; break; case 'D':