On Thu, 29 Jul 2021, Jeff Mears via curl-library wrote:
Another answer would be for libcurl to implement its own wcsdup, because
it's just wcslen + Curl_cmalloc + memcpy.
Not being a Windows guy at all, this seems like the most reasonable way that
doesn't introduce a new API and make things
Right now, if you override the memory allocators with curl_global_init_mem()
then do an operation that uses Windows NT authentication, you will probably
corrupt the heap. This is because libcurl uses _wcsdup() from the C runtime
during the NT authentication, then frees the memory using the