1
0
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:
Yu Watanabe 2021-06-10 18:16:28 +09:00
parent f6e491547d
commit 57bd6aa701

View File

@ -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) {