From 086e950a2b3738bda0ab1080977f1a2915f0e8e4 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 31 May 2022 11:29:41 +0300 Subject: [PATCH] secur32: Remove unused pointer parameter from send request. Signed-off-by: Nikolay Sivov --- 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 050a0a6da4c..794ceff1ecf 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -1297,7 +1297,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; @@ -1353,11 +1352,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 ); @@ -1365,11 +1363,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; };