From 3c206f96fd1e102a13b2971778060fef4be7afbc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:25:37 +0200 Subject: Merging upstream version 3.5.1+dfsg1. Signed-off-by: Daniel Baumann --- winpr/libwinpr/sspi/Kerberos/kerberos.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'winpr/libwinpr/sspi') diff --git a/winpr/libwinpr/sspi/Kerberos/kerberos.c b/winpr/libwinpr/sspi/Kerberos/kerberos.c index 3cf7786..cba8038 100644 --- a/winpr/libwinpr/sspi/Kerberos/kerberos.c +++ b/winpr/libwinpr/sspi/Kerberos/kerberos.c @@ -1496,7 +1496,7 @@ static SECURITY_STATUS SEC_ENTRY kerberos_EncryptMessage(PCtxtHandle phContext, KRB_CONTEXT* context = get_context(phContext); PSecBuffer sig_buffer = NULL; PSecBuffer data_buffer = NULL; - BYTE* header = NULL; + char* header = NULL; BYTE flags = 0; krb5glue_key key = NULL; krb5_keyusage usage = 0; @@ -1547,15 +1547,15 @@ static SECURITY_STATUS SEC_ENTRY kerberos_EncryptMessage(PCtxtHandle phContext, /* Set up the iov array in sig_buffer */ header = sig_buffer->pvBuffer; encrypt_iov[2].data.data = header + 16; - encrypt_iov[3].data.data = (BYTE*)encrypt_iov[2].data.data + encrypt_iov[2].data.length; - encrypt_iov[4].data.data = (BYTE*)encrypt_iov[3].data.data + encrypt_iov[3].data.length; - encrypt_iov[0].data.data = (BYTE*)encrypt_iov[4].data.data + encrypt_iov[4].data.length; + encrypt_iov[3].data.data = encrypt_iov[2].data.data + encrypt_iov[2].data.length; + encrypt_iov[4].data.data = encrypt_iov[3].data.data + encrypt_iov[3].data.length; + encrypt_iov[0].data.data = encrypt_iov[4].data.data + encrypt_iov[4].data.length; encrypt_iov[1].data.data = data_buffer->pvBuffer; /* Write the GSS header with 0 in RRC */ Data_Write_UINT16_BE(header, TOK_ID_WRAP); header[2] = flags; - header[3] = 0xFF; + header[3] = (char)0xFF; Data_Write_UINT32(header + 4, 0); Data_Write_UINT64_BE(header + 8, (context->local_seq + MessageSeqNo)); @@ -1656,8 +1656,8 @@ static SECURITY_STATUS SEC_ENTRY kerberos_DecryptMessage(PCtxtHandle phContext, iov[0].data.data = header + 16 + rrc + ec; iov[1].data.data = data_buffer->pvBuffer; iov[2].data.data = header + 16 + ec; - iov[3].data.data = (BYTE*)iov[2].data.data + iov[2].data.length; - iov[4].data.data = (BYTE*)iov[3].data.data + iov[3].data.length; + iov[3].data.data = iov[2].data.data + iov[2].data.length; + iov[4].data.data = iov[3].data.data + iov[3].data.length; if (krb_log_exec(krb5glue_decrypt_iov, context->ctx, key, usage, iov, ARRAYSIZE(iov))) return SEC_E_INTERNAL_ERROR; -- cgit v1.2.3