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

Fix memcheck errors like "Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)" #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int send_from(int fd, int nowild, char *packet, size_t len,
union mysockaddr *to, union all_addr *source,
unsigned int iface)
{
struct msghdr msg;
struct msghdr msg = { 0 };
struct iovec iov[1];
union {
struct cmsghdr align; /* this ensures alignment */
Expand All @@ -45,7 +45,7 @@ int send_from(int fd, int nowild, char *packet, size_t len,
char control[CMSG_SPACE(sizeof(struct in_addr))];
#endif
char control6[CMSG_SPACE(sizeof(struct in6_pktinfo))];
} control_u;
} control_u = { 0 };

iov[0].iov_base = packet;
iov[0].iov_len = len;
Expand Down