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@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Julien Loir 2021-07-25 14:37:46 +02:00 committed by Alexandre Julliard
parent 1ca8064c88
commit 2ba8976f63

View file

@ -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;