Careful with long, command-line provided interface names.

Obtained from:	OpenBSD (rev 1.5)
This commit is contained in:
obrien 2000-07-20 09:56:18 +00:00
parent 1c98084517
commit e14c244fb4

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;
}