diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-02 23:10:28 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-02 23:32:34 +0100 |
commit | 8bf9fcf48853021ac713d7675b89143e4e8b1ce5 (patch) | |
tree | 1a75df912830e025b11d3e1a80cfaa4f4e8a81d4 | |
parent | cabb78068899232c152f4585f19d023e373aa73d (diff) |
core: extra paranoia when deserializing kdbus fd
-rw-r--r-- | src/core/manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index badf19e954..19493861ec 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2172,7 +2172,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) { } else if (startswith(l, "kdbus-fd=")) { int fd; - if (safe_atoi(l + 9, &fd) < 0 || !fdset_contains(fds, fd)) + if (safe_atoi(l + 9, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd)) log_debug("Failed to parse kdbus fd: %s", l + 9); else { if (m->kdbus_fd >= 0) |