ULONG pfQOP = 0;
BYTE* public_key1;
BYTE* public_key2;
- int public_key_length;
+ int public_key_length = 0;
int signature_length;
- SecBuffer Buffers[2];
+ SecBuffer Buffers[2] = { 0 };
SecBufferDesc Message;
SECURITY_STATUS status;
signature_length = nla->pubKeyAuth.cbBuffer - nla->PublicKey.cbBuffer;
{
WLog_ERR(TAG, "DecryptMessage failure %s [%08"PRIX32"]",
GetSecurityStatusString(status), status);
+ free(buffer);
return status;
}
winpr_HexDump(TAG, WLOG_ERROR, public_key1, public_key_length);
WLog_ERR(TAG, "Actual (length = %d):", public_key_length);
winpr_HexDump(TAG, WLOG_ERROR, public_key2, public_key_length);
+ free(buffer);
return SEC_E_MESSAGE_ALTERED; /* DO NOT SEND CREDENTIALS! */
}
{
wStream* s;
int length;
- int ts_password_creds_length;
+ int ts_password_creds_length = 0;
BOOL ret;
s = Stream_New(ts_credentials->pvBuffer, ts_credentials->cbBuffer);
{
WLog_ERR(TAG, "DecryptMessage failure %s [0x%08"PRIX32"]",
GetSecurityStatusString(status), status);
+ free(buffer);
return status;
}
if (context->Workstation.Length < 1)
{
if (ntlm_SetContextWorkstation(context, NULL) < 0)
+ {
+ ntlm_ContextFree(context);
return SEC_E_INTERNAL_ERROR;
+ }
}
if (ntlm_SetContextServicePrincipalNameW(context, pszTargetName) < 0)
+ {
+ ntlm_ContextFree(context);
return SEC_E_INTERNAL_ERROR;
+ }
sspi_SecureHandleSetLowerPointer(phNewContext, context);
sspi_SecureHandleSetUpperPointer(phNewContext, (void*) NTLM_PACKAGE_NAME);