Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2018 17:59:49 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337916 - head/sbin/bectl
Message-ID:  <201808161759.w7GHxnCO024558@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Aug 16 17:59:49 2018
New Revision: 337916
URL: https://svnweb.freebsd.org/changeset/base/337916

Log:
  bectl(8): Appease clang-scan
  
  Use strlcpy instead of a plain strcpy

Modified:
  head/sbin/bectl/bectl_jail.c

Modified: head/sbin/bectl/bectl_jail.c
==============================================================================
--- head/sbin/bectl/bectl_jail.c	Thu Aug 16 17:56:03 2018	(r337915)
+++ head/sbin/bectl/bectl_jail.c	Thu Aug 16 17:59:49 2018	(r337916)
@@ -153,7 +153,7 @@ jailparam_addarg(char *arg)
 			    val, BE_MAXPATHLEN);
 			return (false);
 		}
-		strcpy(mnt_loc, val);
+		strlcpy(mnt_loc, val, sizeof(mnt_loc));
 	}
 	jailparam_add(name, val);
 	return (true);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808161759.w7GHxnCO024558>