[sr-dev] git:master:782b4773: cdp: init the entire msg structure

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 17 09:01:39 CET 2022


Module: kamailio
Branch: master
Commit: 782b4773119e21a9354d698c0f405d7162166a4a
URL: https://github.com/kamailio/kamailio/commit/782b4773119e21a9354d698c0f405d7162166a4a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-17T09:00:36+01:00

cdp: init the entire msg structure

---

Modified: src/modules/cdp/receiver.c

---

Diff:  https://github.com/kamailio/kamailio/commit/782b4773119e21a9354d698c0f405d7162166a4a.diff
Patch: https://github.com/kamailio/kamailio/commit/782b4773119e21a9354d698c0f405d7162166a4a.patch

---

diff --git a/src/modules/cdp/receiver.c b/src/modules/cdp/receiver.c
index 5aed0a36f4..0bff4131d3 100644
--- a/src/modules/cdp/receiver.c
+++ b/src/modules/cdp/receiver.c
@@ -346,6 +346,7 @@ static int receive_fd(int pipe_fd, int* fd,peer **p)
 		char control[CMSG_SPACE(sizeof(new_fd))];
 	}control_un;
 
+	memset(&msg, 0, sizeof(struct msghdr));
 	msg.msg_control=control_un.control;
 	msg.msg_controllen=sizeof(control_un.control);
 #else




More information about the sr-dev mailing list