summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2019-06-11 16:37:53 +0000
committerivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2019-06-11 16:37:53 +0000
commite73e290393284c656577264ec959e1abbd12f756 (patch)
treefedcf1a444f0fcd2c774737bdbd606d06077b2d1 /misc
parent28693b84143238e777c6598034895d3cb206fd1a (diff)
downloadlibapr-e73e290393284c656577264ec959e1abbd12f756.tar.gz
* misc/win32/misc.c
(apr_get_oslevel): Check return code from GetVersionEx(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861045 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r--misc/win32/misc.c4
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)
{