summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorJorge Niedbalski <jorge.niedbalski@canonical.com>2016-09-28 18:25:50 -0300
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 18:23:38 -0400
commit03e1fb91d297aed7c0eadf4cbecd1505196e1aef (patch)
treec206fcf22d9b61fb3928c8753808c31fe2206dd7 /src/core/manager.c
parent38b383d9fe0f5c4e987c1e01136ae6073076fee3 (diff)
If the notification message length is 0, ignore the message (#4237)
Fixes #4234. Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c4
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) {