summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/vauth/ntlm.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-31 15:02:45 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-31 15:02:45 (GMT)
commite28ea90c1be2e7d3963effa3f7d80f2c8bf3d1d4 (patch)
tree61d94e6d1e595c9ab06bac9e70a153162f523ab8 /Utilities/cmcurl/lib/vauth/ntlm.c
parent692463d271c5afae5c48b8f05117a9a2e035d6be (diff)
parent851cc904a0f3615c9560a2eeba83e04556c0090b (diff)
downloadCMake-e28ea90c1be2e7d3963effa3f7d80f2c8bf3d1d4.zip
CMake-e28ea90c1be2e7d3963effa3f7d80f2c8bf3d1d4.tar.gz
CMake-e28ea90c1be2e7d3963effa3f7d80f2c8bf3d1d4.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2024-01-31 (5ce164e0)
Diffstat (limited to 'Utilities/cmcurl/lib/vauth/ntlm.c')
-rw-r--r--Utilities/cmcurl/lib/vauth/ntlm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/cmcurl/lib/vauth/ntlm.c b/Utilities/cmcurl/lib/vauth/ntlm.c
index ed7cee8..018e6a6 100644
--- a/Utilities/cmcurl/lib/vauth/ntlm.c
+++ b/Utilities/cmcurl/lib/vauth/ntlm.c
@@ -44,6 +44,7 @@
#include "warnless.h"
#include "rand.h"
#include "vtls/vtls.h"
+#include "strdup.h"
#define BUILDING_CURL_NTLM_MSGS_C
#include "vauth/vauth.h"
@@ -184,11 +185,10 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
}
free(ntlm->target_info); /* replace any previous data */
- ntlm->target_info = malloc(target_info_len);
+ ntlm->target_info = Curl_memdup(&type2[target_info_offset],
+ target_info_len);
if(!ntlm->target_info)
return CURLE_OUT_OF_MEMORY;
-
- memcpy(ntlm->target_info, &type2[target_info_offset], target_info_len);
}
}