From owner-cvs-all@FreeBSD.ORG Mon Jul 7 20:10:47 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F2F4106567B; Mon, 7 Jul 2008 20:10:47 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 591D98FC1A; Mon, 7 Jul 2008 20:10:47 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id CBA651A4D80; Mon, 7 Jul 2008 12:52:09 -0700 (PDT) Date: Mon, 7 Jul 2008 12:52:09 -0700 From: Alfred Perlstein To: Ed Maste Message-ID: <20080707195209.GD95574@elvis.mu.org> References: <200807032326.m63NQCdW044654@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200807032326.m63NQCdW044654@repoman.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_usrreq.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 20:10:47 -0000 This really deserves a comment at each invocation of bcopy in order to prevent regressions by someone "fixing" it again. -Alfred * Ed Maste [080703 16:26] wrote: > emaste 2008-07-03 23:26:10 UTC > > FreeBSD src repository > > Modified files: > sys/kern uipc_usrreq.c > Log: > SVN rev 180238 on 2008-07-03 23:26:10Z by emaste > > Use bcopy instead of strlcpy in uipc_bind and unp_connect, since > soun->sun_path isn't a null-terminated string. As UNIX(4) states, "the > terminating NUL is not part of the address." Since strlcpy has to return > "the total length of the string [it] tried to create," it walks off the end > of soun->sun_path looking for a \0. > > This reverts r105332. > > Reported by: Ryan Stone > > Revision Changes Path > 1.215 +4 -2 src/sys/kern/uipc_usrreq.c -- - Alfred Perlstein