Careful with long, command-line provided interface names.

Obtained from:	OpenBSD (rev 1.5)
This commit is contained in:
David E. O'Brien 2000-07-20 09:56:18 +00:00
parent 11c898d281
commit e6d7feef80

View File

@ -486,7 +486,7 @@ struct interface_info *interface_or_dummy (name)
error ("Insufficient memory to record interface %s",
name);
memset (ip, 0, sizeof *ip);
strcpy (ip -> name, name);
strlcpy (ip -> name, name, IFNAMSIZ);
ip -> next = dummy_interfaces;
dummy_interfaces = ip;
}