Rob Shearman : wininet: Don' t try to read anything if 0 bytes are to be read.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 10 15:47:34 CST 2007


Module: wine
Branch: master
Commit: 392ceba61f36fa4b2006a83194e9a0ca66160071
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=392ceba61f36fa4b2006a83194e9a0ca66160071

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Jan 10 09:30:22 2007 -0600

wininet: Don't try to read anything if 0 bytes are to be read.

---

 dlls/wininet/netconnection.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c
index 8a4c72b..2418b97 100644
--- a/dlls/wininet/netconnection.c
+++ b/dlls/wininet/netconnection.c
@@ -498,6 +498,11 @@ BOOL NETCON_recv(WININET_NETCONNECTION *
 		int *recvd /* out */)
 {
     if (!NETCON_connected(connection)) return FALSE;
+    if (!len)
+    {
+        *recvd = 0;
+        return TRUE;
+    }
     if (!connection->useSSL)
     {
 	*recvd = recv(connection->socketFD, buf, len, flags);




More information about the wine-cvs mailing list