From b3eebbd5ecf13e380654d98118c1d0bfa1706059 Mon Sep 17 00:00:00 2001 From: jsd1982 Date: Thu, 13 May 2021 22:11:01 -0500 Subject: [PATCH] command: initialize netcmd->cmd_source_len before recvfrom() --- command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/command.c b/command.c index 6dcc779da0..f1d7db4ea3 100644 --- a/command.c +++ b/command.c @@ -166,6 +166,7 @@ static void command_network_poll(command_t *handle) char buf[1024]; buf[0] = '\0'; + netcmd->cmd_source_len = sizeof(struct sockaddr_storage); ret = recvfrom(netcmd->net_fd, buf, sizeof(buf) - 1, 0, (struct sockaddr*)&netcmd->cmd_source, &netcmd->cmd_source_len);