Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 2006 22:46:55 +0800
From:      Rong-En Fan <grafan@gmail.com>
To:        Ruslan Ermilov <ru@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: [PATCH] Fix off-by-one bug in ifconfig's af_link.c
Message-ID:  <6eb82e0601160646o2dcaeb3eh676aa3cb7883617c@mail.gmail.com>
In-Reply-To: <20060115191800.GH4687@ip.net.ua>
References:  <6eb82e0601140926n3d86e146m99aa9f47569b24aa@mail.gmail.com> <20060114182410.GA1108@galgenberg.net> <20060115182941.GA1182@galgenberg.net> <20060115191800.GH4687@ip.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/16/06, Ruslan Ermilov <ru@freebsd.org> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6eb82e0601160646o2dcaeb3eh676aa3cb7883617c>