Re: [E1000-devel] [linux-nics] [PATCH] net: ethernet: intel: ixgbe: ixgbe_main.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Jeff Kirsher
On Wed, 2014-06-04 at 23:29 +0200, Rickard Strandqvist wrote: > Added a guaranteed null-terminate after call to strncpy. > > This was partly found using a static code analysis program called > cppcheck. > > Signed-off-by: Rickard Strandqvist > > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_main

Re: [E1000-devel] [PATCH] net: ethernet: intel: ixgbe: ixgbe_main.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Rustad, Mark D
On Jun 4, 2014, at 2:55 PM, Joe Perches wrote: > On Wed, 2014-06-04 at 23:29 +0200, Rickard Strandqvist wrote: >> Added a guaranteed null-terminate after call to strncpy. > > Perhaps all of these should be strlcpy The code that is there seems fine. The length of the array exceeds the length of

Re: [E1000-devel] [PATCH] net: ethernet: intel: ixgbe: ixgbe_main.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Joe Perches
On Wed, 2014-06-04 at 23:29 +0200, Rickard Strandqvist wrote: > Added a guaranteed null-terminate after call to strncpy. Perhaps all of these should be strlcpy -- Learn Graph Databases - Download FREE O'Reilly Book "Gra

[E1000-devel] [PATCH] net: ethernet: intel: ixgbe: ixgbe_main.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Rickard Strandqvist
Added a guaranteed null-terminate after call to strncpy. This was partly found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dri