Re: [PATCH] Fix off-by-one bug in ifconfig's af_link.c

From: Ruslan Ermilov <ru_at_freebsd.org>
Date: Sun, 15 Jan 2006 21:18:00 +0200
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

Received on Sun Jan 15 2006 - 18:23:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:50 UTC