File 0009-ws2_32-Add-note-in-bind-for-AF_UNIX-sockets.patch of Package wine

From 553be2b056bce659dbac79aae81f7a808929ccd1 Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Wed, 28 May 2025 01:12:26 +0200
Subject: [PATCH 9/9] ws2_32: Add note in bind() for AF_UNIX sockets

---
 dlls/ws2_32/socket.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 4af9f23b538..397097cde73 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -1239,6 +1239,8 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
 
     if (addr->sa_family == AF_UNIX && *addr->sa_data)
     {
+        /* The corresponding unix path is appended to a buffer with
+         * the structure sockaddr_un and can have a length of <= PATH_MAX */
         struct sockaddr_un sun = { 0 };
         WCHAR *sun_pathW;
         memcpy(&sun, addr, len);
-- 
2.50.0

openSUSE Build Service is sponsored by