Permalink
Browse files

If the notification message length is 0, ignore the message (#4237)

Fixes #4234.

Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
  • Loading branch information...
niedbalski authored and keszybz committed Sep 28, 2016
1 parent 831d3dc commit 531ac2b2349da02acc9c382849758e07eb92b020
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/manager.c
@@ -1721,6 +1721,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) {

1 comment on commit 531ac2b

@dejIO

This comment has been minimized.

Please sign in to comment.