[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:02:30 UTC 2012


The following commit has been merged in the wheezy branch:
commit ab6ef0a4939704e628c5e3aee103ebae55baa2d5
Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Fri Mar 23 00:23:48 2012 -0300

    ws2_32: Handle NULL proto in WSAAsyncGetServByName.
    (cherry picked from commit 70be64b2ba9704f806ff4b4aab632aea827a2313)

diff --git a/dlls/ws2_32/async.c b/dlls/ws2_32/async.c
index cc330bb..573349f 100644
--- a/dlls/ws2_32/async.c
+++ b/dlls/ws2_32/async.c
@@ -384,7 +384,7 @@ HANDLE WINAPI WSAAsyncGetServByName(HWND hWnd, UINT uMsg, LPCSTR name,
 {
     struct async_query_getservbyname *aq;
     unsigned int len1 = strlen(name) + 1;
-    unsigned int len2 = strlen(proto) + 1;
+    unsigned int len2 = proto ? strlen(proto) + 1 : 0;
 
     TRACE("hwnd %p, msg %04x, name %s, proto %s\n", hWnd, uMsg, debugstr_a(name), debugstr_a(proto));
 
@@ -393,10 +393,18 @@ HANDLE WINAPI WSAAsyncGetServByName(HWND hWnd, UINT uMsg, LPCSTR name,
         SetLastError( WSAEWOULDBLOCK );
         return 0;
     }
+
     aq->serv_name  = (char *)(aq + 1);
-    aq->serv_proto = aq->serv_name + len1;
     strcpy( aq->serv_name, name );
-    strcpy( aq->serv_proto, proto );
+
+    if (proto)
+    {
+        aq->serv_proto = aq->serv_name + len1;
+        strcpy( aq->serv_proto, proto );
+    }
+    else
+        aq->serv_proto = NULL;
+
     return run_query( hWnd, uMsg, async_getservbyname, &aq->query, sbuf, buflen );
 }
 

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list