mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 18:27:04 +03:00
networkd: link_object_find - don't accept invalid input
Reported by Zbigniew.
This commit is contained in:
parent
769b56a308
commit
1c11181458
@ -101,7 +101,8 @@ int link_object_find(sd_bus *bus, const char *path, const char *interface, void
|
||||
if (r < 0)
|
||||
return 0;
|
||||
|
||||
if (sscanf(identifier, "%d", &ifindex) != 1)
|
||||
r = safe_atoi(identifier, &ifindex);
|
||||
if (r < 0)
|
||||
return 0;
|
||||
|
||||
r = link_get(m, ifindex, &link);
|
||||
|
Loading…
Reference in New Issue
Block a user