Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-09 Thread Gaëtan Rivet
On 09/10/20 11:59 +0100, Ferruh Yigit wrote: > On 10/9/2020 11:36 AM, Gaëtan Rivet wrote: > > On 07/10/20 12:45 +0100, Ferruh Yigit wrote: > > > On 10/7/2020 11:28 AM, Bruce Richardson wrote: > > > > On Wed, Oct 07, 2020 at 11:26:38AM +0100, Bruce Richardson wrote: > > > > > On Wed, Oct 07, 2020 at

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-09 Thread Ferruh Yigit
On 10/9/2020 11:36 AM, Gaëtan Rivet wrote: On 07/10/20 12:45 +0100, Ferruh Yigit wrote: On 10/7/2020 11:28 AM, Bruce Richardson wrote: On Wed, Oct 07, 2020 at 11:26:38AM +0100, Bruce Richardson wrote: On Wed, Oct 07, 2020 at 11:51:31AM +0200, Olivier Matz wrote: On Wed, Oct 07, 2020 at 10:40:

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-09 Thread Bruce Richardson
On Fri, Oct 09, 2020 at 12:36:30PM +0200, Gaëtan Rivet wrote: > On 07/10/20 12:45 +0100, Ferruh Yigit wrote: > > On 10/7/2020 11:28 AM, Bruce Richardson wrote: > > > On Wed, Oct 07, 2020 at 11:26:38AM +0100, Bruce Richardson wrote: > > > > On Wed, Oct 07, 2020 at 11:51:31AM +0200, Olivier Matz wrot

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-09 Thread Gaëtan Rivet
On 07/10/20 12:45 +0100, Ferruh Yigit wrote: > On 10/7/2020 11:28 AM, Bruce Richardson wrote: > > On Wed, Oct 07, 2020 at 11:26:38AM +0100, Bruce Richardson wrote: > > > On Wed, Oct 07, 2020 at 11:51:31AM +0200, Olivier Matz wrote: > > > > On Wed, Oct 07, 2020 at 10:40:32AM +0100, Ferruh Yigit wrot

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-07 Thread Ferruh Yigit
On 10/7/2020 11:28 AM, Bruce Richardson wrote: On Wed, Oct 07, 2020 at 11:26:38AM +0100, Bruce Richardson wrote: On Wed, Oct 07, 2020 at 11:51:31AM +0200, Olivier Matz wrote: On Wed, Oct 07, 2020 at 10:40:32AM +0100, Ferruh Yigit wrote: On 10/7/2020 10:01 AM, Ciara Loftus wrote: strncpy may l

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-07 Thread Bruce Richardson
On Wed, Oct 07, 2020 at 11:26:38AM +0100, Bruce Richardson wrote: > On Wed, Oct 07, 2020 at 11:51:31AM +0200, Olivier Matz wrote: > > On Wed, Oct 07, 2020 at 10:40:32AM +0100, Ferruh Yigit wrote: > > > On 10/7/2020 10:01 AM, Ciara Loftus wrote: > > > > strncpy may leave the destination buffer not N

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-07 Thread Bruce Richardson
On Wed, Oct 07, 2020 at 11:51:31AM +0200, Olivier Matz wrote: > On Wed, Oct 07, 2020 at 10:40:32AM +0100, Ferruh Yigit wrote: > > On 10/7/2020 10:01 AM, Ciara Loftus wrote: > > > strncpy may leave the destination buffer not NULL terminated so use > > > snprintf instead. > > > > What do you think u

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-07 Thread Olivier Matz
On Wed, Oct 07, 2020 at 10:40:32AM +0100, Ferruh Yigit wrote: > On 10/7/2020 10:01 AM, Ciara Loftus wrote: > > strncpy may leave the destination buffer not NULL terminated so use > > snprintf instead. > > What do you think using 'strlcpy'? Or even better, rte_strscpy() https://git.dpdk.org/dpdk/c

Re: [dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-07 Thread Ferruh Yigit
On 10/7/2020 10:01 AM, Ciara Loftus wrote: strncpy may leave the destination buffer not NULL terminated so use snprintf instead. What do you think using 'strlcpy'? Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") Signed-off-by: Ciara Loftus --- drivers/net/af

[dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-07 Thread Ciara Loftus
strncpy may leave the destination buffer not NULL terminated so use snprintf instead. Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g