From: Tobias Brunner Date: Wed, 2 Jul 2014 09:54:40 +0000 (+0200) Subject: windows: accept() socket handle could theoretically be 0 X-Git-Tag: 5.2.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0026600bfe1a57c979d88c33fad0328e91cbad8d;p=thirdparty%2Fstrongswan.git windows: accept() socket handle could theoretically be 0 --- diff --git a/src/libstrongswan/utils/windows.c b/src/libstrongswan/utils/windows.c index a4b98340b4..d679684d76 100644 --- a/src/libstrongswan/utils/windows.c +++ b/src/libstrongswan/utils/windows.c @@ -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;