Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-16 Thread Marc Kleine-Budde
On 09/14/2014 07:31 PM, Rickard Strandqvist wrote: > Replacing strncpy with strlcpy to avoid strings that lacks null terminate. > > Signed-off-by: Rickard Strandqvist > --- > drivers/net/can/usb/peak_usb/pcan_usb_core.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

RE: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-16 Thread David Laight
From: Rickard Strandqvist > > 2014-09-15 10:47 GMT+02:00 David Laight : ... > > Or: > > char name[sizeof netdev->name]; > > memcpy(name, netdev->name, sizeof netdev->name); > > ... > I liked the variant: > char name[sizeof(netdev->name)]; > > But dislike and do not understand what the

RE: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-16 Thread David Laight
From: Rickard Strandqvist 2014-09-15 10:47 GMT+02:00 David Laight david.lai...@aculab.com: ... Or: char name[sizeof netdev-name]; memcpy(name, netdev-name, sizeof netdev-name); ... I liked the variant: char name[sizeof(netdev-name)]; But dislike and do not understand what

Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-16 Thread Marc Kleine-Budde
On 09/14/2014 07:31 PM, Rickard Strandqvist wrote: Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/net/can/usb/peak_usb/pcan_usb_core.c |2 +- 1 file changed, 1

Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread Rickard Strandqvist
2014-09-15 10:47 GMT+02:00 David Laight : > From: Marc Kleine-Budde [ >> On 09/15/2014 10:28 AM, David Laight wrote: >> > From: Rickard Strandqvist >> > ... >> >> Replacing strncpy with strlcpy to avoid strings that lacks null terminate. >> > ... >> >> diff --git

RE: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread David Laight
From: Marc Kleine-Budde [ > On 09/15/2014 10:28 AM, David Laight wrote: > > From: Rickard Strandqvist > > ... > >> Replacing strncpy with strlcpy to avoid strings that lacks null terminate. > > ... > >> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c > >>

Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread Marc Kleine-Budde
On 09/15/2014 10:28 AM, David Laight wrote: > From: Rickard Strandqvist > ... >> Replacing strncpy with strlcpy to avoid strings that lacks null terminate. > ... >> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c >> b/drivers/net/can/usb/peak_usb/pcan_usb_core.c >> index 644e6ab..d4fe8ac

RE: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread David Laight
From: Rickard Strandqvist ... > Replacing strncpy with strlcpy to avoid strings that lacks null terminate. ... > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c > b/drivers/net/can/usb/peak_usb/pcan_usb_core.c > index 644e6ab..d4fe8ac 100644 > ---

Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread Stephane Grosjean
Acked-by: Stephane Grosjean Le 14/09/2014 19:31, Rickard Strandqvist a écrit : Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist --- drivers/net/can/usb/peak_usb/pcan_usb_core.c |2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread Stephane Grosjean
Acked-by: Stephane Grosjean s.grosj...@peak-system.com Le 14/09/2014 19:31, Rickard Strandqvist a écrit : Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se ---

RE: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread David Laight
From: Rickard Strandqvist ... Replacing strncpy with strlcpy to avoid strings that lacks null terminate. ... diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index 644e6ab..d4fe8ac 100644 ---

Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread Marc Kleine-Budde
On 09/15/2014 10:28 AM, David Laight wrote: From: Rickard Strandqvist ... Replacing strncpy with strlcpy to avoid strings that lacks null terminate. ... diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index 644e6ab..d4fe8ac 100644

RE: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread David Laight
From: Marc Kleine-Budde [ On 09/15/2014 10:28 AM, David Laight wrote: From: Rickard Strandqvist ... Replacing strncpy with strlcpy to avoid strings that lacks null terminate. ... diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c

Re: [PATCH] net: can: usb: peak_usb: pcan_usb_core.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-15 Thread Rickard Strandqvist
2014-09-15 10:47 GMT+02:00 David Laight david.lai...@aculab.com: From: Marc Kleine-Budde [ On 09/15/2014 10:28 AM, David Laight wrote: From: Rickard Strandqvist ... Replacing strncpy with strlcpy to avoid strings that lacks null terminate. ... diff --git