1
0
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:
Tom Gundersen 2015-02-09 22:02:32 +01:00
parent 769b56a308
commit 1c11181458

View File

@ -101,7 +101,8 @@ int link_object_find(sd_bus *bus, const char *path, const char *interface, void
if (r < 0) if (r < 0)
return 0; return 0;
if (sscanf(identifier, "%d", &ifindex) != 1) r = safe_atoi(identifier, &ifindex);
if (r < 0)
return 0; return 0;
r = link_get(m, ifindex, &link); r = link_get(m, ifindex, &link);