All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] 3c505.c: replacing strcpy to strncpy
@ 2007-02-25 16:57 Douglas Schilling Landgraf
  2007-02-26  7:54 ` Milind Choudhary
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Douglas Schilling Landgraf @ 2007-02-25 16:57 UTC (permalink / raw)
  To: kernel-janitors

Use strncpy instead of strcpy.

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>

Index: linux-2.6.20.1/drivers/net/3c505.c
=================================--- linux-2.6.20.1.orig/drivers/net/3c505.c
+++ linux-2.6.20.1/drivers/net/3c505.c
@@ -1154,8 +1154,8 @@ static struct net_device_stats *elp_get_
 static void netdev_get_drvinfo(struct net_device *dev,
 			       struct ethtool_drvinfo *info)
 {
-	strcpy(info->driver, DRV_NAME);
-	strcpy(info->version, DRV_VERSION);
+	strncpy(info->driver, DRV_NAME, sizeof(info->driver)-1);
+	strncpy(info->version, DRV_VERSION, sizeof(info->driver)-1);
 	sprintf(info->bus_info, "ISA 0x%lx", dev->base_addr);
 }
 
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-02-27 19:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-25 16:57 [KJ] [PATCH] 3c505.c: replacing strcpy to strncpy Douglas Schilling Landgraf
2007-02-26  7:54 ` Milind Choudhary
2007-02-27  0:16 ` Douglas Schilling Landgraf
2007-02-27  0:24 ` burns.ethan
2007-02-27  9:03 ` Standard Azi
2007-02-27  9:07 ` Bernhard R. Link
2007-02-27 16:12 ` burns.ethan
2007-02-27 16:31 ` burns.ethan
2007-02-27 17:31 ` Bernhard R. Link
2007-02-27 17:50 ` burns.ethan
2007-02-27 18:07 ` Douglas Landgraf
2007-02-27 19:20 ` Ira Snyder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.