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@gmail.com --- Example of initialization usage that fails without this patch: https://github.com/matoya/libmatoya/blob/master/src/windows/tlsw.c#L275 --- 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;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=94572
Your paranoid android.
=== debiant2 (build log) ===
error: patch failed: dlls/secur32/schannel.c:659 Task: Patch failed to apply
=== debiant2 (build log) ===
error: patch failed: dlls/secur32/schannel.c:659 Task: Patch failed to apply