windows: determine RtlVerifyVersionInfo address on global init

Instead of the first internal call to `curlx_verify_windows_version()`.

To avoid the chance of a race, potentially resulting in initializing
this address twice. AFAICT it could not cause an issue before this
patch.

Reported by Codex Security

Follow-up to b17ef873ae #18009

Closes #20853
This commit is contained in:
Viktor Szakats 2026-03-08 15:12:17 +01:00
parent ccba492024
commit 6a6826469d
No known key found for this signature in database
4 changed files with 31 additions and 22 deletions

View file

@ -901,6 +901,7 @@ curl_socket_t win32_stdin_read_thread(void)
CURLcode win32_init(void)
{
curlx_verify_windows_init();
curlx_now_init();
#ifndef CURL_WINDOWS_UWP
init_terminal();