mirror of
https://github.com/systemd/systemd
synced 2024-10-07 00:30:59 +00:00
netlink: check input name is valid before calling netlink method
This commit is contained in:
parent
f6e491547d
commit
57bd6aa701
|
@ -274,6 +274,9 @@ int rtnl_resolve_link_alternative_name(sd_netlink **rtnl, const char *name) {
|
|||
|
||||
assert(name);
|
||||
|
||||
if (!ifname_valid_full(name, IFNAME_VALID_ALTERNATIVE))
|
||||
return -EINVAL;
|
||||
|
||||
if (!rtnl)
|
||||
rtnl = &our_rtnl;
|
||||
if (!*rtnl) {
|
||||
|
|
Loading…
Reference in a new issue