From 3e7c14bc2fe4e883174581acf6238204b6a46b5c Mon Sep 17 00:00:00 2001 From: Ivan Zhakov Date: Tue, 11 Jun 2019 16:37:53 +0000 Subject: * misc/win32/misc.c (apr_get_oslevel): Check return code from GetVersionEx(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1861045 13f79535-47bb-0310-9956-ffa450edef68 --- misc/win32/misc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/win32/misc.c b/misc/win32/misc.c index 4bed39e12..5ded3fed9 100644 --- a/misc/win32/misc.c +++ b/misc/win32/misc.c @@ -29,7 +29,9 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level) { static OSVERSIONINFO oslev; oslev.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&oslev); + if (!GetVersionEx(&oslev)) { + return apr_get_os_error(); + } if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT) { -- cgit v1.2.1