diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-06-11 16:37:53 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-06-11 16:37:53 +0000 |
commit | 3e7c14bc2fe4e883174581acf6238204b6a46b5c (patch) | |
tree | fedcf1a444f0fcd2c774737bdbd606d06077b2d1 /misc | |
parent | db88348d3c3516fc373fd33bc5a3145d1c31ac43 (diff) | |
download | apr-3e7c14bc2fe4e883174581acf6238204b6a46b5c.tar.gz |
* 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
Diffstat (limited to 'misc')
-rw-r--r-- | misc/win32/misc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |