From: David Kimdon <[EMAIL PROTECTED]>
dev->name and ndev->name are both IFNAMSIZ in length, the ".%d" is
not guarenteed to fit in ndev->name.
Signed-off-by: David Kimdon <[EMAIL PROTECTED]>
Signed-off-by: Jiri Benc <[EMAIL PROTECTED]>
---
net/d80211/ieee80211_iface.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
e268081fcce1027a23420bfe74c59bf130742bce
diff --git a/net/d80211/ieee80211_iface.c b/net/d80211/ieee80211_iface.c
index ae1fb9e..bb15442 100644
--- a/net/d80211/ieee80211_iface.c
+++ b/net/d80211/ieee80211_iface.c
@@ -56,7 +56,8 @@ int ieee80211_if_add(struct net_device *
if (strlen(name) == 0) {
i = 0;
do {
- sprintf(ndev->name, "%s.%d", dev->name, i++);
+ snprintf(ndev->name, sizeof(ndev->name), "%s.%d",
+ dev->name, i++);
tmp_dev = dev_get_by_name(ndev->name);
if (!tmp_dev)
break;
--
1.3.0
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html