If the notification message length is 0, ignore the message (#4237)
Fixes #4234. Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
831d3dc8d7
commit
531ac2b234
@@ -1721,6 +1721,10 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
|
|||||||
|
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
if (n == 0) {
|
||||||
|
log_debug("Got zero-length notification message. Ignoring.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
CMSG_FOREACH(cmsg, &msghdr) {
|
CMSG_FOREACH(cmsg, &msghdr) {
|
||||||
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
|
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
|
||||||
|
|||||||
Reference in New Issue
Block a user