Re: [dpdk-dev] [RFC PATCH] use strlcpy for string copies

2018-02-23 Thread Matteo Croce
On Tue, Feb 20, 2018 at 6:07 PM, Bruce Richardson wrote: > Following on from the number of patches needing to be done for strncpy > issues highlighted by coverity... > > The strncpy function is error prone for doing "safe" string copies, so > we generally try to use "snprintf" instead in the code.

Re: [dpdk-dev] [RFC PATCH] use strlcpy for string copies

2018-02-23 Thread Adrien Mazarguil
On Tue, Feb 20, 2018 at 05:07:27PM +, Bruce Richardson wrote: > Following on from the number of patches needing to be done for strncpy > issues highlighted by coverity... > > The strncpy function is error prone for doing "safe" string copies, so > we generally try to use "snprintf" instead in

Re: [dpdk-dev] [RFC PATCH] use strlcpy for string copies

2018-02-20 Thread Stephen Hemminger
On Tue, 20 Feb 2018 17:07:27 + Bruce Richardson wrote: > Following on from the number of patches needing to be done for strncpy > issues highlighted by coverity... > > The strncpy function is error prone for doing "safe" string copies, so > we generally try to use "snprintf" instead in the c

[dpdk-dev] [RFC PATCH] use strlcpy for string copies

2018-02-20 Thread Bruce Richardson
Following on from the number of patches needing to be done for strncpy issues highlighted by coverity... The strncpy function is error prone for doing "safe" string copies, so we generally try to use "snprintf" instead in the code. The function "strlcpy" is a better alternative, though, since it b