10 Feb
2023
10 Feb
'23
9:51 p.m.
Zebediah Figura (@zfigura) commented about dlls/ntdll/unix/socket.c:
} }
+static int sockaddr_get_port( const struct WS_sockaddr *wsaddr, int wsaddrlen ) +{ + switch (wsaddr->sa_family) + { + case WS_AF_INET: + { + struct WS_sockaddr_in win = {0}; + if (wsaddrlen < sizeof(win)) return 0;
This will end up hitting the zero-port case if the address is invalid, which doesn't seem right. Probably "is port zero" is a better semantics for this function, as an earlier iteration. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2100#note_23775