summaryrefslogtreecommitdiffstats
path: root/src/ntlm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ntlm.c')
-rw-r--r--src/ntlm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ntlm.c b/src/ntlm.c
index 41b21f6..d10917f 100644
--- a/src/ntlm.c
+++ b/src/ntlm.c
@@ -1231,7 +1231,10 @@ int ntlm_encode_auth_msg(struct ntlm_ctx *ctx,
/* this must be second as it pushes the payload further down */
if (mic) {
- memcpy(&buffer.data[data_offs], mic->data, mic->length);
+ memset(&buffer.data[data_offs], 0, mic->length);
+ /* return the actual pointer back in the mic, as it will
+ * be backfilled later by the caller */
+ mic->data = &buffer.data[data_offs];
data_offs += mic->length;
}