changeset 25:fd43f179ff1d

themwi-mncc: need to initialize sa_len before accept call
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 28 Jun 2022 18:47:56 -0800
parents 52e801b5ebb1
children c08d81fa8117
files mncc/mtsock.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mncc/mtsock.c	Tue Jun 28 18:36:47 2022 -0800
+++ b/mncc/mtsock.c	Tue Jun 28 18:47:56 2022 -0800
@@ -56,6 +56,7 @@
 	int fd;
 	struct socket_conn *conn;
 
+	sa_len = sizeof sa;
 	fd = accept(mtcall_listener, (struct sockaddr *) &sa, &sa_len);
 	if (fd < 0) {
 		syslog(LOG_CRIT, "accept on UNIX socket: %m");