From: Douglas Schilling Landgraf <dougsland@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] 3c505.c: replacing strcpy to strncpy
Date: Tue, 27 Feb 2007 00:16:12 +0000 [thread overview]
Message-ID: <20070227011036.GA13220@localhost.localdomain> (raw)
In-Reply-To: <20070225173528.GB3595@localhost.localdomain>
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->version)-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
next prev parent reply other threads:[~2007-02-27 0:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070227011036.GA13220@localhost.localdomain \
--to=dougsland@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.