mirror of
https://github.com/systemd/systemd.git
synced 2024-12-26 03:22:00 +03: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 New Issue
Block a user