-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from crazy-max/update
Samba 4.20.6
- Loading branch information
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 0098d86d2998cff056ec19e734e17bf99d5314ae Mon Sep 17 00:00:00 2001 | ||
From: CrazyMax <[email protected]> | ||
Date: Fri, 27 Dec 2024 15:40:27 +0100 | ||
Subject: [PATCH] fix msghdr initialization | ||
|
||
--- | ||
wsdd2.c | 10 +++++++++- | ||
1 file changed, 9 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/wsdd2.c b/wsdd2.c | ||
index 4f91f6e..1590561 100644 | ||
--- a/wsdd2.c | ||
+++ b/wsdd2.c | ||
@@ -543,7 +543,15 @@ static int netlink_recv(struct endpoint *ep) | ||
char buf[PAGE_SIZE]; | ||
struct sockaddr_nl sa; | ||
struct iovec iov = { buf, sizeof buf }; | ||
- struct msghdr msg = { &sa, sizeof sa, &iov, 1, NULL, 0, 0 }; | ||
+ struct msghdr msg; | ||
+ memset(&msg, 0, sizeof(msg)); | ||
+ msg.msg_name = &sa; | ||
+ msg.msg_namelen = sizeof(sa); | ||
+ msg.msg_iov = &iov; | ||
+ msg.msg_iovlen = 1; | ||
+ msg.msg_control = NULL; | ||
+ msg.msg_controllen = 0; | ||
+ msg.msg_flags = 0; | ||
ssize_t msglen = recvmsg(ep->sock, &msg, 0); | ||
|
||
DEBUG(2, W, "%s: %zd bytes", __func__, msglen); | ||
-- |