Hans Leidekker : wininet: Always reset the second input buffer in netcon_secure_connect_setup().

Alexandre Julliard julliard at winehq.org
Wed Jul 6 16:54:45 CDT 2022


Module: wine
Branch: master
Commit: f83a66f052162c1e0db6121128fe7e804ac15ee1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f83a66f052162c1e0db6121128fe7e804ac15ee1

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Jul  6 10:32:18 2022 +0200

wininet: Always reset the second input buffer in netcon_secure_connect_setup().

---

 dlls/wininet/netconnection.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c
index a3ca03d3ef1..b3649b5a53b 100644
--- a/dlls/wininet/netconnection.c
+++ b/dlls/wininet/netconnection.c
@@ -493,14 +493,12 @@ static DWORD netcon_secure_connect_setup(netconn_t *connection, BOOL compat_mode
 
             memmove(read_buf, (BYTE*)in_bufs[0].pvBuffer+in_bufs[0].cbBuffer-in_bufs[1].cbBuffer, in_bufs[1].cbBuffer);
             in_bufs[0].cbBuffer = in_bufs[1].cbBuffer;
-
-            in_bufs[1].BufferType = SECBUFFER_EMPTY;
-            in_bufs[1].cbBuffer = 0;
-            in_bufs[1].pvBuffer = NULL;
         }
 
         assert(in_bufs[0].BufferType == SECBUFFER_TOKEN);
         in_bufs[1].BufferType = SECBUFFER_EMPTY;
+        in_bufs[1].cbBuffer = 0;
+        in_bufs[1].pvBuffer = NULL;
 
         if(in_bufs[0].cbBuffer + 1024 > read_buf_size) {
             BYTE *new_read_buf;




More information about the wine-cvs mailing list