From owner-svn-src-all@freebsd.org Sat Dec 19 01:27:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A821A4B888; Sat, 19 Dec 2015 01:27:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1253A1198; Sat, 19 Dec 2015 01:27:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x22c.google.com with SMTP id ur14so68409074pab.0; Fri, 18 Dec 2015 17:27:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=pCR2GDu35VcC4ZsIddgGfBJOd/OrYWJygKj6WxxE99c=; b=AuHk8GEnyZyIEZN3AwreqFpb7TwqYswkCvBth9QQzfupM6EIbittuKG2L7xJmcE6rY edF2bptpJrtu939A5qSGba3HcJQtjndy2bz1XoZFvh5HpmLdgqjL0axBCG1Ewu1RAZe7 xgFPSWRrn69VzhDB7ddgkglG1sH7Gw5JgYLQ0j1+AuBvWvB9BCHRnclHdRIEzXy7w37q qlPXkO+o8bb4wYcOVF6PhJwmILLz0OjX9Bad4DVHeJ++yZ4m6yV4+faFkirpG4zPg3DT qnGQlUvQKcT6Ypz2dy3eqHZCe9s548ShtGnCM9PBGQu28b50AkWI4jmk0seuwtbn+2SB Bpdw== X-Received: by 10.66.140.79 with SMTP id re15mr9495629pab.127.1450488477545; Fri, 18 Dec 2015 17:27:57 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:7494:dafc:c8fd:bb12? ([2601:601:800:126d:7494:dafc:c8fd:bb12]) by smtp.gmail.com with ESMTPSA id w26sm20256338pfi.78.2015.12.18.17.27.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Dec 2015 17:27:56 -0800 (PST) Content-Type: text/plain; charset=cp932 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r292454 - head/bin/ed From: Garrett Cooper X-Mailer: iPhone Mail (13C75) In-Reply-To: Date: Fri, 18 Dec 2015 17:27:55 -0800 Cc: Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201512182158.tBILwhRB040583@repo.freebsd.org> <44E9BE06-1883-4AF8-816D-D699CF733EEB@bsdimp.com> To: cem@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 01:27:58 -0000 > On Dec 18, 2015, at 15:46, Conrad Meyer wrote: >=20 >> On Fri, Dec 18, 2015 at 2:44 PM, Pedro Giffuni wrote: >> Hi Warner; >>=20 >>> Il giorno 18/dic/2015, alle ore 17:01, Warner Losh ha s= critto: >>>=20 >>> Isn=81ft strlcpy() the more appropriate interface? strncpy doesn=81ft gu= arantee NUL termination. >>=20 >> Maybe, but we were using strcpy() which doesn=81ft guarantee NULL termina= tion either >> and things have been working. I also thought that portability may be spec= ially important >> for the stuff in bin/. >=20 > strcpy() does guarantee NUL termination. Otherwise it would be useless. >=20 > DESCRIPTION > The stpcpy() and strcpy() functions copy the string src to dst (includ= ing > the terminating =81e\0=81f character.) +1 to using strlcpy instead of strcpy/strncpy. Thanks!=