* [PATCH] net: can: sja1000: peak_pcmcia.c: Cleaning up missing null-terminate in conjunction with strncpy
@ 2014-09-14 17:30 Rickard Strandqvist
2014-09-15 8:02 ` Stephane Grosjean
0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2014-09-14 17:30 UTC (permalink / raw)
To: Wolfgang Grandegger, Marc Kleine-Budde
Cc: Rickard Strandqvist, Christopher R. Baker, linux-can, netdev,
linux-kernel
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/net/can/sja1000/peak_pcmcia.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c
index dd56133..fc9f8b01 100644
--- a/drivers/net/can/sja1000/peak_pcmcia.c
+++ b/drivers/net/can/sja1000/peak_pcmcia.c
@@ -487,7 +487,7 @@ static void pcan_free_channels(struct pcan_pccard *card)
if (!netdev)
continue;
- strncpy(name, netdev->name, IFNAMSIZ);
+ strlcpy(name, netdev->name, IFNAMSIZ);
unregister_sja1000dev(netdev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: can: sja1000: peak_pcmcia.c: Cleaning up missing null-terminate in conjunction with strncpy
2014-09-14 17:30 [PATCH] net: can: sja1000: peak_pcmcia.c: Cleaning up missing null-terminate in conjunction with strncpy Rickard Strandqvist
@ 2014-09-15 8:02 ` Stephane Grosjean
0 siblings, 0 replies; 2+ messages in thread
From: Stephane Grosjean @ 2014-09-15 8:02 UTC (permalink / raw)
To: Rickard Strandqvist, Wolfgang Grandegger, Marc Kleine-Budde
Cc: Christopher R. Baker, linux-can, netdev, linux-kernel
Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
Le 14/09/2014 19:30, Rickard Strandqvist a écrit :
> Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/net/can/sja1000/peak_pcmcia.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c
> index dd56133..fc9f8b01 100644
> --- a/drivers/net/can/sja1000/peak_pcmcia.c
> +++ b/drivers/net/can/sja1000/peak_pcmcia.c
> @@ -487,7 +487,7 @@ static void pcan_free_channels(struct pcan_pccard *card)
> if (!netdev)
> continue;
>
> - strncpy(name, netdev->name, IFNAMSIZ);
> + strlcpy(name, netdev->name, IFNAMSIZ);
>
> unregister_sja1000dev(netdev);
>
--
PEAK-System Technik GmbH, Otto-Roehm-Strasse 69, D-64293 Darmstadt
Geschaeftsleitung: A.Gach/U.Wilhelm,St.Nr.:007/241/13586 FA Darmstadt
HRB-9183 Darmstadt, Ust.IdNr.:DE 202220078, WEE-Reg.-Nr.: DE39305391
Tel.+49 (0)6151-817320 / Fax:+49 (0)6151-817329, info@peak-system.com
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-15 8:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-14 17:30 [PATCH] net: can: sja1000: peak_pcmcia.c: Cleaning up missing null-terminate in conjunction with strncpy Rickard Strandqvist
2014-09-15 8:02 ` Stephane Grosjean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).