mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 08:53:38 +00:00
secur32: Simplify input buffer handling for schan_recv() call.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
fee52bd43c
commit
1c894ec973
|
@ -1409,6 +1409,7 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
|
|||
SIZE_T received = 0;
|
||||
int idx;
|
||||
unsigned char *buf_ptr;
|
||||
SecBufferDesc input_desc = { 0 };
|
||||
|
||||
TRACE("context_handle %p, message %p, message_seq_no %ld, quality %p\n",
|
||||
context_handle, message, message_seq_no, quality);
|
||||
|
@ -1446,8 +1447,11 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle
|
|||
|
||||
received = data_size;
|
||||
|
||||
input_desc.cBuffers = 1;
|
||||
input_desc.pBuffers = &message->pBuffers[idx];
|
||||
|
||||
params.session = ctx->session;
|
||||
params.input = message;
|
||||
params.input = &input_desc;
|
||||
params.input_size = expected_size;
|
||||
params.buffer = data;
|
||||
params.length = &received;
|
||||
|
|
|
@ -307,7 +307,7 @@ static int recv_message_get_next_buffer(struct schan_buffers *s)
|
|||
{
|
||||
if (s->current_buffer_idx != -1)
|
||||
return -1;
|
||||
return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_DATA);
|
||||
return s->desc->cBuffers ? 0 : -1;
|
||||
}
|
||||
|
||||
static char *get_buffer(struct schan_buffers *s, SIZE_T *count)
|
||||
|
|
Loading…
Reference in a new issue