From: Dexter Gerig Date: Tue, 28 Jan 2025 04:45:38 +0000 (-0600) Subject: asyn-thread: fix HTTPS RR resolution X-Git-Tag: curl-8_12_0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afb3fd71120aeb4c1ac8edb532391e861d4d2838;p=thirdparty%2Fcurl.git asyn-thread: fix HTTPS RR resolution Store the received data correctly. Closes #16107 --- diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index c7e84353cb..895efbc7b5 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -64,6 +64,7 @@ #include "inet_ntop.h" #include "curl_threads.h" #include "connect.h" +#include "strdup.h" #ifdef USE_ARES #include @@ -619,6 +620,17 @@ CURLcode Curl_resolver_is_resolved(struct Curl_easy *data, destroy_async_data(&data->state.async); return result; } +#ifdef USE_HTTPSRR_ARES + { + struct Curl_https_rrinfo *lhrr = + Curl_memdup(&td->hinfo, sizeof(struct Curl_https_rrinfo)); + if(!lhrr) { + destroy_async_data(&data->state.async); + return CURLE_OUT_OF_MEMORY; + } + data->state.async.dns->hinfo = lhrr; + } +#endif destroy_async_data(&data->state.async); *entry = data->state.async.dns; }