From owner-freebsd-current@FreeBSD.ORG Mon Jan 16 14:46:56 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B9E216A43E for ; Mon, 16 Jan 2006 14:46:56 +0000 (GMT) (envelope-from grafan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEBCC43D45 for ; Mon, 16 Jan 2006 14:46:55 +0000 (GMT) (envelope-from grafan@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so892687wxc for ; Mon, 16 Jan 2006 06:46:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jfEGcZrsC60nva12w5k/LsEECU1TETBVXzjmaH3kLSHEkYt4YuueCWEBfPISdspf5p7dZRlFVC8Qc92qHD3J8q4mI5eDQQWVfvph0w4SKMWPmZnMJw9ZawUrZbB7wJnlRJK6lVKMK0S5d9JzsvdIO2gQQqON965efF5CuBLNkU4= Received: by 10.70.75.2 with SMTP id x2mr7780119wxa; Mon, 16 Jan 2006 06:46:55 -0800 (PST) Received: by 10.70.126.13 with HTTP; Mon, 16 Jan 2006 06:46:55 -0800 (PST) Message-ID: <6eb82e0601160646o2dcaeb3eh676aa3cb7883617c@mail.gmail.com> Date: Mon, 16 Jan 2006 22:46:55 +0800 From: Rong-En Fan To: Ruslan Ermilov In-Reply-To: <20060115191800.GH4687@ip.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <6eb82e0601140926n3d86e146m99aa9f47569b24aa@mail.gmail.com> <20060114182410.GA1108@galgenberg.net> <20060115182941.GA1182@galgenberg.net> <20060115191800.GH4687@ip.net.ua> Cc: current@freebsd.org Subject: Re: [PATCH] Fix off-by-one bug in ifconfig's af_link.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 14:46:56 -0000 On 1/16/06, Ruslan Ermilov wrote: > On Sun, Jan 15, 2006 at 07:29:41PM +0100, Ulrich Spoerlein wrote: > > Ulrich Sp?rlein wrote: > > > I'm pretty sure it's the link_getaddr in af_link.c, there are two > > > possible fixes, depending on the requirements of link_addr() > > > > > > If link_addr *needs* a terminating '\0', then we need to > > > malloc(strlen(addr) + 2), if it doesn't need the terminating zero, we > > > should get away with strncpy(temp + 1, addr, strlen(addr)) > > > > Yeah, seems to be a slow sunday today. Attached is the fix for this > > off-by-one bug. > > > Committed, thanks! Thanks! This fixed my problem. rafan.