From owner-svn-src-all@freebsd.org Sat Dec 19 00:45:21 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 3B8B3A4BF5D; Sat, 19 Dec 2015 00:45:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com [209.85.160.170]) (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 03F951AE0; Sat, 19 Dec 2015 00:45:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yk0-f170.google.com with SMTP id x184so77981904yka.3; Fri, 18 Dec 2015 16:45:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=iTF8y+7o2xunfkbOsYg3tjNyx8L84Cc/HNhmc1DjKTQ=; b=OZW+9HmXlCw6moLDCGLUJsV7XKcWsPWI7hsWykmcMDQ5+bsYWVSr5NoQp8vEVMbbJQ fv2VNVJ0JxgSnGtMWXMK/vz4/p0unNLQ6EI10sZBMPs0RB/XF2YEUu5N19HBOyzHWE8b Ppo2NRD4gvP2WSPhN5krlJ2Ibx1T4NDZ5odPehIcicIOx9RK/HgoTun4bD6hT59XZ2b3 qS4kq551UUJac+gEELE8Um8dHzZqmmzo7YsSkA4cEpC8elE2xFEERNYmSEf0tR4/0nsd Yke+SBLoOsdKcKMii+rcC4EFxRZj7Hlq3R7GMGJUGzlyL0Mkf3nptpi0/YLu3HLnypvz 10Zg== X-Received: by 10.129.44.4 with SMTP id s4mr5495142yws.114.1450482411273; Fri, 18 Dec 2015 15:46:51 -0800 (PST) Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com. [209.85.160.176]) by smtp.gmail.com with ESMTPSA id h130sm18405993ywb.24.2015.12.18.15.46.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Dec 2015 15:46:51 -0800 (PST) Received: by mail-yk0-f176.google.com with SMTP id 140so76360771ykp.0; Fri, 18 Dec 2015 15:46:50 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.129.57.69 with SMTP id g66mr5272099ywa.267.1450482410739; Fri, 18 Dec 2015 15:46:50 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.4.69 with HTTP; Fri, 18 Dec 2015 15:46:50 -0800 (PST) In-Reply-To: References: <201512182158.tBILwhRB040583@repo.freebsd.org> <44E9BE06-1883-4AF8-816D-D699CF733EEB@bsdimp.com> Date: Fri, 18 Dec 2015 15:46:50 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r292454 - head/bin/ed From: Conrad Meyer To: Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 00:45:21 -0000 On Fri, Dec 18, 2015 at 2:44 PM, Pedro Giffuni wrote: > Hi Warner; > >> Il giorno 18/dic/2015, alle ore 17:01, Warner Losh ha s= critto: >> >> Isn=E2=80=99t strlcpy() the more appropriate interface? strncpy doesn=E2= =80=99t guarantee NUL termination. >> > > Maybe, but we were using strcpy() which doesn=E2=80=99t guarantee NULL te= rmination either > and things have been working. I also thought that portability may be spec= ially important > for the stuff in bin/. strcpy() does guarantee NUL termination. Otherwise it would be useless. DESCRIPTION The stpcpy() and strcpy() functions copy the string src to dst (includ= ing the terminating =E2=80=98\0=E2=80=99 character.) Best, Conrad