> > DJM-2 usr/src/cmd/cmd-inet/sbin/netstrategy/netstrategy.c:204,242 > > > > I think these strncpy can be replaced with the safer strlcpy. > > No. These are actually correct. lifr_name is a fixed-length array, > and the fact that strncpy zeros out to the end of the array is a > desirable feature.
There is no requirement I'm aware of that requires the rest of the interface name array to be zeroed. Why is that desirable? Yes, it's true that with strlcpy() you're restricted to an interface name of LIFNAMSIZ-1 characters, but that seems unlikely to cause real-world problems. -- meem _______________________________________________ networking-discuss mailing list [email protected]
