Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sd-daemon: wipe out memory before using CMSG_NXTHDR() #1540

Merged
merged 1 commit into from Oct 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libsystemd/sd-daemon/sd-daemon.c
Expand Up @@ -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) {
Expand Down