[PATCH] Fix off-by-one bug in ifconfig's af_link.c
Ruslan Ermilov
ru at freebsd.org
Sun Jan 15 11:23:56 PST 2006
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!
Cheers,
--
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20060115/682e98a8/attachment.bin
More information about the freebsd-current
mailing list