Julien Loir : secur32: Ignore attribute when searching for buffer type.

Alexandre Julliard julliard at winehq.org
Mon Jul 26 15:30:27 CDT 2021


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

Author: Julien Loir <mini.jul.jl at gmail.com>
Date:   Sun Jul 25 14:37:46 2021 +0200

secur32: Ignore attribute when searching for buffer type.

Buffer types in PSecBufferDesc can have an optional attribute. When
searching, it must be ignored to ensure the buffer type is found.

Signed-off-by: Julien Loir <mini.jul.jl at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/secur32/schannel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 515f01d08a3..eb8106e88c7 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -659,7 +659,8 @@ static int schan_find_sec_buffer_idx(const SecBufferDesc *desc, unsigned int sta
     for (i = start_idx; i < desc->cBuffers; ++i)
     {
         buffer = &desc->pBuffers[i];
-        if (buffer->BufferType == buffer_type) return i;
+        if ((buffer->BufferType | SECBUFFER_ATTRMASK) == (buffer_type | SECBUFFER_ATTRMASK))
+            return i;
     }
 
     return -1;




More information about the wine-cvs mailing list