1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-25 18:50:18 +03:00

Merge pull request #1540 from zonque/cmsg

sd-daemon: wipe out memory before using CMSG_NXTHDR()
This commit is contained in:
David Herrmann 2015-10-12 15:23:51 +02:00
commit b7d18f23df

View File

@ -454,7 +454,7 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
(n_fds > 0 ? CMSG_SPACE(sizeof(int) * n_fds) : 0) +
(have_pid ? CMSG_SPACE(sizeof(struct ucred)) : 0);
msghdr.msg_control = alloca(msghdr.msg_controllen);
msghdr.msg_control = alloca0(msghdr.msg_controllen);
cmsg = CMSG_FIRSTHDR(&msghdr);
if (n_fds > 0) {