Re: [PATCH] Fix off-by-one bug in ifconfig's af_link.c
- From: Rong-En Fan <grafan@xxxxxxxxx>
- Date: Mon, 16 Jan 2006 22:46:55 +0800
On 1/16/06, Ruslan Ermilov <ru@xxxxxxxxxxx> 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.
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- References:
- change mac address via ifconfig causes corrupted redzone
- From: Rong-En Fan
- Re: change mac address via ifconfig causes corrupted redzone
- From: Ulrich Spoerlein
- [PATCH] Fix off-by-one bug in ifconfig's af_link.c
- From: Ulrich Spoerlein
- Re: [PATCH] Fix off-by-one bug in ifconfig's af_link.c
- From: Ruslan Ermilov
- change mac address via ifconfig causes corrupted redzone
- Prev by Date: Re: malloc bugs with tcpdump
- Next by Date: Re: Malloc bugs exhibited in ports/mail/dovecot
- Previous by thread: Re: [PATCH] Fix off-by-one bug in ifconfig's af_link.c
- Next by thread: [PATCH] Support for large number of md(4) disks
- Index(es):
Relevant Pages
|
|