if handle is not initialized, orig_stderr variable could take random value, which we observe on Windows 8.1 (bug reported here as well: https://forums.openvpn.net/topic13246.html )
diff --git a/src/openvpn/error.c b/src/openvpn/error.c
index ebe9a52..b34d209 100644
--- a/src/openvpn/error.c
+++ b/src/openvpn/error.c
@@ -459,7 +459,7 @@ static HANDLE orig_stderr;
HANDLE
get_orig_stderr (void)
{
- if (orig_stderr)
+ if (std_redir)
return orig_stderr;
else
return GetStdHandle (STD_ERROR_HANDLE);
