curl 2024-01-31 (5ce164e0)

Code extracted from:

    https://github.com/curl/curl.git

at commit 5ce164e0e9290c96eb7d502173426c0a135ec008 (curl-8_6_0).
This commit is contained in:
Curl Upstream
2024-01-31 08:03:52 +01:00
committed by Brad King
parent fe5ffe06a9
commit 851cc904a0
137 changed files with 7356 additions and 4568 deletions
+2 -4
View File
@@ -25,6 +25,7 @@
#include "curl_setup.h"
#include "urldata.h"
#include "bufref.h"
#include "strdup.h"
#include "curl_memory.h"
#include "memdebug.h"
@@ -116,12 +117,9 @@ CURLcode Curl_bufref_memdup(struct bufref *br, const void *ptr, size_t len)
DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
if(ptr) {
cpy = malloc(len + 1);
cpy = Curl_memdup0(ptr, len);
if(!cpy)
return CURLE_OUT_OF_MEMORY;
if(len)
memcpy(cpy, ptr, len);
cpy[len] = '\0';
}
Curl_bufref_set(br, cpy, len, curl_free);