diff options
author | Jorge Niedbalski <jorge.niedbalski@canonical.com> | 2016-09-28 18:25:50 -0300 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-10-21 18:23:38 -0400 |
commit | 03e1fb91d297aed7c0eadf4cbecd1505196e1aef (patch) | |
tree | c206fcf22d9b61fb3928c8753808c31fe2206dd7 | |
parent | 38b383d9fe0f5c4e987c1e01136ae6073076fee3 (diff) |
If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
-rw-r--r-- | src/core/manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 4d84a0b37e..a085ed899a 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1648,6 +1648,10 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t return -errno; } + if (n == 0) { + log_debug("Got zero-length notification message. Ignoring."); + return 0; + } CMSG_FOREACH(cmsg, &msghdr) { if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { |