summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-link-bus.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-09 22:02:32 +0100
committerTom Gundersen <teg@jklm.no>2015-02-09 22:02:32 +0100
commit1c11181458990715e0ffd49e848baac5959e3c89 (patch)
treef3b01103bd828e43c9fb830da9668b46261943a9 /src/network/networkd-link-bus.c
parentnetworkd: support route scopes (diff)
downloadsystemd-1c11181458990715e0ffd49e848baac5959e3c89.tar.xz
systemd-1c11181458990715e0ffd49e848baac5959e3c89.zip
networkd: link_object_find - don't accept invalid input
Reported by Zbigniew.
Diffstat (limited to 'src/network/networkd-link-bus.c')
-rw-r--r--src/network/networkd-link-bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-link-bus.c b/src/network/networkd-link-bus.c
index 370707c307..1a1524dfb4 100644
--- a/src/network/networkd-link-bus.c
+++ b/src/network/networkd-link-bus.c
@@ -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);