16 Jun
2023
16 Jun
'23
5:31 p.m.
Zebediah Figura (@zfigura) commented about dlls/ntdll/unix/socket.c:
return sizeof(uaddr->in6); }
+ case WS_AF_UNIX: + { + struct WS_sockaddr_un win = {0}; + + if (wsaddrlen < sizeof(win)) return 0; + memcpy( &win, wsaddr, sizeof(win) ); + uaddr->un.sun_family = AF_UNIX; + memcpy( uaddr->un.sun_path, win.sun_path, sizeof(win.sun_path) ); + return sizeof(uaddr->un);
This can't work, though; we need to convert it to Unix first. (Or print a FIXME and fail for DGRAM sockets.) Linux man-pages call out returning sizeof(sockaddr_un) as okay on Linux, but is it portable? We may want to return strlen()+1 just to be safe. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2786#note_35915