From b1e69f74dd16da55301f41d87ce40e276623a4e5 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 19 Feb 2025 15:23:15 -0400 Subject: [PATCH] MT#61625 fix getsockname call Change-Id: If58e83e3bd03d39b552ed1e843d31baefe5c8e37 --- lib/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/socket.c b/lib/socket.c index acfd28d0f..078624c0f 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -318,7 +318,7 @@ static bool __ip_accept(socket_t *s, socket_t *newsock) { } static bool __ip_getsockname(socket_t *s) { struct sockaddr_storage sin; - socklen_t sinlen; + socklen_t sinlen = sizeof(sin); int ret = getsockname(s->fd, (struct sockaddr *) &sin, &sinlen); if (ret != 0) return false;