From ed57943fd484fe6b2f7148e52af1886cb86c22f7 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Wed, 28 Oct 2009 13:17:08 +0100 Subject: [PATCH] Using snprintf for interface name. --- master/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/master/module.c b/master/module.c index 0162d4f2..3d427989 100644 --- a/master/module.c +++ b/master/module.c @@ -463,7 +463,8 @@ ec_device_t *ecdev_offer( ec_device_attach(&master->main_device, net_dev, poll, module); up(&master->device_sem); - sprintf(net_dev->name, "ec%u", master->index); + snprintf(net_dev->name, IFNAMSIZ, "ec%u", master->index); + return &master->main_device; // offer accepted } else {