Fixed oob read in ntlm_read_ntlm_v2_response
This commit is contained in:
parent
8fa3835963
commit
afdffac4b5
@ -124,6 +124,9 @@ void ntlm_print_version_info(NTLM_VERSION_INFO* versionInfo)
|
||||
static int ntlm_read_ntlm_v2_client_challenge(wStream* s, NTLMv2_CLIENT_CHALLENGE* challenge)
|
||||
{
|
||||
size_t size;
|
||||
if (Stream_GetRemainingLength(s) < 28)
|
||||
return -1;
|
||||
|
||||
Stream_Read_UINT8(s, challenge->RespType);
|
||||
Stream_Read_UINT8(s, challenge->HiRespType);
|
||||
Stream_Read_UINT16(s, challenge->Reserved1);
|
||||
@ -163,6 +166,8 @@ static int ntlm_write_ntlm_v2_client_challenge(wStream* s, NTLMv2_CLIENT_CHALLEN
|
||||
|
||||
int ntlm_read_ntlm_v2_response(wStream* s, NTLMv2_RESPONSE* response)
|
||||
{
|
||||
if (Stream_GetRemainingLength(s) < 16)
|
||||
return -1;
|
||||
Stream_Read(s, response->Response, 16);
|
||||
return ntlm_read_ntlm_v2_client_challenge(s, &(response->Challenge));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user