From owner-freebsd-audit Fri Mar 9 14:22: 3 2001 Delivered-To: freebsd-audit@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id C6FF437B718; Fri, 9 Mar 2001 14:21:49 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.2/8.11.2) with ESMTP id f29MNOC89005; Fri, 9 Mar 2001 22:23:24 GMT (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f29MOZu05704; Fri, 9 Mar 2001 22:24:35 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200103092224.f29MOZu05704@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Warner Losh Cc: Brian Somers , freebsd-audit@FreeBSD.ORG, eivind@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: libutil/MAXHOSTNAMELEN changes - plus a buffer overrun fix In-Reply-To: Message from Warner Losh of "Fri, 09 Mar 2001 15:10:18 MST." <200103092210.f29MAII10967@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 09 Mar 2001 22:24:35 +0000 From: Brian Somers Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [.....] } > : > : + strncpy(host, buf, hsize); > : > > : > Should likely use strlcpy. > : > : The returned string (host) is not meant to be terminated if the host > : fits exactly - eg, realhostname(ut.ut_host, UT_HOSTSIZE, ...). > > Then we should terminate it. That's a lame interface. It's a practical interface. It's also a public interface :*) > Warner -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message