Skip to content
Snippets Groups Projects
Commit 943aea62 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Make sure that the user and domain strings fit in the target buffer before we

copy them there.
parent b433e4a1
No related branches found
No related tags found
No related merge requests found
......@@ -713,6 +713,13 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
size=64;
ntlmbuf[62]=ntlmbuf[63]=0;
/* Make sure that the user and domain strings fit in the target buffer
before we copy them there. */
if(size + userlen + domlen >= sizeof(ntlmbuf)) {
failf(conn->data, "user + domain name too big");
return CURLE_OUT_OF_MEMORY;
}
memcpy(&ntlmbuf[size], domain, domlen);
size += domlen;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment