summaryrefslogtreecommitdiff
path: root/networking/vconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/vconfig.c')
-rw-r--r--networking/vconfig.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/networking/vconfig.c b/networking/vconfig.c
index 7b6c2fa..3f12e76 100644
--- a/networking/vconfig.c
+++ b/networking/vconfig.c
@@ -133,10 +133,7 @@ int vconfig_main(int argc, char **argv)
if (ifr.cmd == SET_VLAN_NAME_TYPE_CMD) { /* set_name_type */
ifr.u.name_type = *xfind_str(name_types+1, argv[1]);
} else {
- if (strlen(argv[1]) >= IF_NAMESIZE) {
- bb_error_msg_and_die("if_name >= %d chars", IF_NAMESIZE);
- }
- strcpy(ifr.device1, argv[1]);
+ strncpy(ifr.device1, argv[1], IFNAMSIZ);
p = argv[2];
/* I suppose one could try to combine some of the function calls below,