Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 May 2005 00:24:19 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        gurney_j@resnet.uoregon.edu
Cc:        cperciva@freebsd.org
Subject:   Re: cvs commit: src/sys/kern subr_bus.c subr_rman.c vfs_subr.c src/sys/net if_mib.c src/sys/netinet ip_divert.c raw_ip.c udp_usrreq.c
Message-ID:  <20050506.002419.88383520.imp@bsdimp.com>
In-Reply-To: <20050506062013.GD2670@funkthat.com>
References:  <20050506032202.GC2670@funkthat.com> <20050505.232214.96921001.imp@bsdimp.com> <20050506062013.GD2670@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Yes, I understand that.  But Like I said before, it is better to zero
the entire hunk of memory with bzero or M_ZERO....

The problem with strncpy is that it doesn't guarantee NUL
termination when strlen(s) > sizeof(d).

Warner



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