Re: [dpdk-dev] [PATCH v2] eal: add strscpy function

2018-09-19 Thread Thomas Monjalon
12/09/2018 15:29, Ferruh Yigit: > On 9/11/2018 4:00 PM, Gaetan Rivet wrote: > > The strncpy function has long been deemed unsafe for use, > > in favor of strlcpy or snprintf. > > > > While snprintf is standard and strlcpy is still largely available, > > they both have issues regarding error checki

Re: [dpdk-dev] [PATCH v2] eal: add strscpy function

2018-09-12 Thread Ferruh Yigit
On 9/11/2018 4:00 PM, Gaetan Rivet wrote: > The strncpy function has long been deemed unsafe for use, > in favor of strlcpy or snprintf. > > While snprintf is standard and strlcpy is still largely available, > they both have issues regarding error checking and performance. > > Both will force rea

[dpdk-dev] [PATCH v2] eal: add strscpy function

2018-09-11 Thread Gaetan Rivet
The strncpy function has long been deemed unsafe for use, in favor of strlcpy or snprintf. While snprintf is standard and strlcpy is still largely available, they both have issues regarding error checking and performance. Both will force reading the source buffer past the requested size if the in