Hans Leidekker : winhttp: Always reset the second input buffer in netcon_secure_connect().

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


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

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

winhttp: Always reset the second input buffer in netcon_secure_connect().

---

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

diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index be776ae2971..31d8529f1d7 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -343,14 +343,12 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur
 
             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