From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/secur32/schannel.c | 9 +-------- dlls/secur32/schannel_gnutls.c | 6 +++--- dlls/secur32/secur32_priv.h | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 527596fcc57..d015ff8d75a 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -1295,7 +1295,6 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle SECURITY_STATUS status; SecBuffer *buffer; SIZE_T data_size; - SIZE_T length; char *data; int output_buffer_idx = -1; ULONG output_offset = 0; @@ -1351,11 +1350,10 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle buffer_index[1] = data_idx; buffer_index[2] = trailer_idx;
- length = data_size; params.session = ctx->session; params.output = &output_desc; params.buffer = data; - params.length = &length; + params.length = data_size; params.output_buffer_idx = &output_buffer_idx; params.output_offset = &output_offset; status = GNUTLS_CALL( send, ¶ms ); @@ -1363,11 +1361,6 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle if (!status) message->pBuffers[buffer_index[output_buffer_idx]].cbBuffer = output_offset;
- TRACE("Sent %Id bytes.\n", length); - - if (length != data_size) - status = SEC_E_INTERNAL_ERROR; - free(data);
TRACE("Returning %#lx.\n", status); diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c index 0657f9ab064..4d7711f32a2 100644 --- a/dlls/secur32/schannel_gnutls.c +++ b/dlls/secur32/schannel_gnutls.c @@ -786,12 +786,12 @@ static NTSTATUS schan_send( void *args )
for (;;) { - ret = pgnutls_record_send(s, (const char *)params->buffer + total, *params->length - total); + ret = pgnutls_record_send(s, (const char *)params->buffer + total, params->length - total); if (ret >= 0) { total += ret; - TRACE( "sent %ld now %ld/%ld\n", ret, total, *params->length ); - if (total == *params->length) break; + TRACE( "sent %ld now %ld/%u\n", ret, total, (unsigned)params->length ); + if (total == params->length) break; } else if (ret == GNUTLS_E_AGAIN) { diff --git a/dlls/secur32/secur32_priv.h b/dlls/secur32/secur32_priv.h index 8a494309710..edbe1ccc36e 100644 --- a/dlls/secur32/secur32_priv.h +++ b/dlls/secur32/secur32_priv.h @@ -166,7 +166,7 @@ struct send_params schan_session session; SecBufferDesc *output; const void *buffer; - SIZE_T *length; + ULONG length; int *output_buffer_idx; ULONG *output_offset; };