summaryrefslogtreecommitdiffstats
path: root/src/ntlm_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ntlm_crypto.c')
-rw-r--r--src/ntlm_crypto.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ntlm_crypto.c b/src/ntlm_crypto.c
index 58c7191..46b7d97 100644
--- a/src/ntlm_crypto.c
+++ b/src/ntlm_crypto.c
@@ -597,10 +597,9 @@ int ntlmv2_verify_nt_response(struct ntlm_buffer *nt_response,
nt_resp = (union wire_ntlm_response *)nt_response->data;
- payload.length = 8;
- payload.data = server_chal;
-
- payload.length = nt_response->length - 8;
+ payload.length = nt_response->length
+ - sizeof(nt_resp->v2.resp)
+ + sizeof(server_chal);
payload.data = malloc(payload.length);
if (!payload.data) return ENOMEM;
memcpy(payload.data, server_chal, 8);