Skip to content

Commit

Permalink
ntlm: clear lm and nt response buffers before use
Browse files Browse the repository at this point in the history
To avoid the risk of MemorySanitizer: use-of-uninitialized-value

Closes #10814
  • Loading branch information
bagder committed Mar 23, 2023
1 parent 955e276 commit 0c2fcb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/vauth/ntlm.c
Expand Up @@ -511,6 +511,8 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
size_t userlen = 0;
size_t domlen = 0;

memset(lmresp, 0, sizeof(lmresp));
memset(ntresp, 0, sizeof(ntresp));
user = strchr(userp, '\\');
if(!user)
user = strchr(userp, '/');
Expand Down

0 comments on commit 0c2fcb0

Please sign in to comment.