Using snprintf for interface name.
authorFlorian Pose <fp@igh-essen.com>
Wed, 28 Oct 2009 13:17:08 +0100
changeset 1548 b4ad9d06962d
parent 1545 cd9672f63886
child 1549 68d2af150381
Using snprintf for interface name.
master/module.c
--- a/master/module.c	Tue Oct 20 13:14:53 2009 +0200
+++ b/master/module.c	Wed Oct 28 13:17:08 2009 +0100
@@ -463,7 +463,8 @@
             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 {