[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1300219208-2708-1-git-send-email-sasikanth.v19@gmail.com>
Date: Wed, 16 Mar 2011 01:30:08 +0530
From: Sasikanth V <sasikanth.v19@...il.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, Sasikanth V <sasikanth.v19@...il.com>
Subject: [PATCH] Fix overflow of name in struct net_device, replaced sprintf with snprintf.
Signed-off-by: Sasikanth V <sasikanth.v19@...il.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists