[systemd-commits] src/network
Tom Gundersen
tomegun at kemper.freedesktop.org
Mon Feb 9 13:03:54 PST 2015
src/network/networkd-link-bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 1c11181458990715e0ffd49e848baac5959e3c89
Author: Tom Gundersen <teg at jklm.no>
Date: Mon Feb 9 22:02:32 2015 +0100
networkd: link_object_find - don't accept invalid input
Reported by Zbigniew.
diff --git a/src/network/networkd-link-bus.c b/src/network/networkd-link-bus.c
index 370707c..1a1524d 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);
More information about the systemd-commits
mailing list