Date: Fri, 09 Mar 2001 15:26:52 -0700 From: Warner Losh <imp@harmony.village.org> To: Brian Somers <brian@Awfulhak.org> Cc: freebsd-audit@FreeBSD.ORG, eivind@FreeBSD.ORG Subject: Re: libutil/MAXHOSTNAMELEN changes - plus a buffer overrun fix Message-ID: <200103092226.f29MQqI11070@harmony.village.org> In-Reply-To: Your message of "Fri, 09 Mar 2001 22:24:35 GMT." <200103092224.f29MOZu05704@hak.lan.Awfulhak.org> References: <200103092224.f29MOZu05704@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200103092224.f29MOZu05704@hak.lan.Awfulhak.org> Brian Somers writes: : [.....] } : > : > : + 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 :*) Ummm, it is lame in that it doesn't NUL termniate. Is it a standard, or can we change it. If we lose one character for utmp, I don't care. Intefaces like this are inharently lame and should not be encouraged and actively discouraged when possible. That's what I'm doing right now. Actively discouraging it and trying to get it changed. Warmer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103092226.f29MQqI11070>