mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix memcheck errors like "Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)"
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -35,7 +35,7 @@ int send_from(int fd, int nowild, char *packet, size_t len,
|
|||||||
union mysockaddr *to, union all_addr *source,
|
union mysockaddr *to, union all_addr *source,
|
||||||
unsigned int iface)
|
unsigned int iface)
|
||||||
{
|
{
|
||||||
struct msghdr msg;
|
struct msghdr msg = { 0 };
|
||||||
struct iovec iov[1];
|
struct iovec iov[1];
|
||||||
union {
|
union {
|
||||||
struct cmsghdr align; /* this ensures alignment */
|
struct cmsghdr align; /* this ensures alignment */
|
||||||
@@ -45,7 +45,7 @@ int send_from(int fd, int nowild, char *packet, size_t len,
|
|||||||
char control[CMSG_SPACE(sizeof(struct in_addr))];
|
char control[CMSG_SPACE(sizeof(struct in_addr))];
|
||||||
#endif
|
#endif
|
||||||
char control6[CMSG_SPACE(sizeof(struct in6_pktinfo))];
|
char control6[CMSG_SPACE(sizeof(struct in6_pktinfo))];
|
||||||
} control_u;
|
} control_u = { 0 };
|
||||||
|
|
||||||
iov[0].iov_base = packet;
|
iov[0].iov_base = packet;
|
||||||
iov[0].iov_len = len;
|
iov[0].iov_len = len;
|
||||||
|
|||||||
Reference in New Issue
Block a user