diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2021-10-04 15:52:01 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2021-10-07 03:18:22 -0400 |
commit | 5044909ca251d3d190d8c5cc45243a04d244eaed (patch) | |
tree | 588ef740cc8098320ca65944f1a8b63ca4dac988 /src/tool_doswin.c | |
parent | a031614a8470bc7ef269e98c1a6a38b0b822ff24 (diff) | |
download | curl-5044909ca251d3d190d8c5cc45243a04d244eaed.tar.gz |
version_win32: use actual version instead of manifested version
- Use RtlVerifyVersionInfo instead of VerifyVersionInfo, when possible.
Later versions of Windows have normal version functions that compare and
return versions based on the way the application is manifested, instead
of the actual version of Windows the application is running on. We
prefer the actual version of Windows so we'll now call the Rtl variant
of version functions (RtlVerifyVersionInfo) which does a proper
comparison of the actual version.
Reported-by: Wyatt O'Day
Ref: https://github.com/curl/curl/pull/7727
Fixes https://github.com/curl/curl/issues/7742
Closes https://github.com/curl/curl/pull/7810
Diffstat (limited to 'src/tool_doswin.c')
-rw-r--r-- | src/tool_doswin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tool_doswin.c b/src/tool_doswin.c index 98e13bc09..1ad9cddc3 100644 --- a/src/tool_doswin.c +++ b/src/tool_doswin.c @@ -766,6 +766,8 @@ bool tool_isVistaOrGreater; CURLcode win32_init(void) { + /* curlx_verify_windows_version must be called during init at least once + because it has its own initialization routine. */ if(curlx_verify_windows_version(6, 0, PLATFORM_WINNT, VERSION_GREATER_THAN_EQUAL)) tool_isVistaOrGreater = true; |