[PATCH] Fix overflow of name in struct net_device, replaced sprintf with snprintf.
From: Sasikanth V <hidden>
Date: 2011-03-15 20:00:19
Signed-off-by: Sasikanth V <redacted> --- 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