From: Sasikanth V <sasikanth.v19@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Sasikanth V <sasikanth.v19@gmail.com>
Subject: [PATCH] Fix overflow of name in struct net_device, replaced sprintf with snprintf.
Date: Wed, 16 Mar 2011 01:30:08 +0530 [thread overview]
Message-ID: <1300219208-2708-1-git-send-email-sasikanth.v19@gmail.com> (raw)
Signed-off-by: Sasikanth V <sasikanth.v19@gmail.com>
---
net/core/dev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 6561021..a74efa9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -539,7 +539,7 @@ unsigned long netdev_boot_base(const char *prefix, int unit)
char name[IFNAMSIZ];
int i;
- sprintf(name, "%s%d", prefix, unit);
+ snprintf(name, IFNAMSIZ, "%s%d", prefix, unit);
/*
* If device already registered then return base of 1
--
1.7.3.4
next reply other threads:[~2011-03-15 20:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 20:00 Sasikanth V [this message]
2011-03-15 21:48 ` [PATCH] Fix overflow of name in struct net_device, replaced sprintf with snprintf Stephen Hemminger
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=1300219208-2708-1-git-send-email-sasikanth.v19@gmail.com \
--to=sasikanth.v19@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@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 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).