]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
windows: accept() socket handle could theoretically be 0
authorTobias Brunner <tobias@strongswan.org>
Wed, 2 Jul 2014 09:54:40 +0000 (11:54 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 2 Jul 2014 10:38:45 +0000 (12:38 +0200)
src/libstrongswan/utils/windows.c

index a4b98340b4a7855466ef454813aec195a4f1beb3..d679684d762bd100d752e3cfc5c186acb8046a8b 100644 (file)
@@ -230,7 +230,7 @@ int socketpair(int domain, int type, int protocol, int sv[2])
                connect(c, (struct sockaddr*)&addr, sizeof(addr)) == 0)
        {
                sc = accept(s, NULL, NULL);
-               if (sc > 0)
+               if (sc >= 0)
                {
                        closesocket(s);
                        s = sc;