Message ID | 1519191510-3826-1-git-send-email-selva.nair@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [Openvpn-devel] Adapt to RegGetValue brokenness in Windows 7 | expand |
Acked-by: Gert Doering <gert@greenie.muc.de> Patch matches the problem discussed in the mail thread here and on stackoverflow (RRF_RT_REG_SZ|RRF_RT_REG_EXPAND_SZ broken on Win7), cross compiled on ubuntu 16.04, installed & tested on Win7/64, and works again :-) Thanks. Your patch has been applied to the master and release/2.4 branch. commit 7de0ee4f6f6f44fab48717e4cc2073ff4e8580f6 (master) commit e9b85ebd2895fda85daeb15a9794d5a2e3a79fab (release/2.4) Author: Selva Nair Date: Wed Feb 21 00:38:30 2018 -0500 Adapt to RegGetValue brokenness in Windows 7 Signed-off-by: Selva Nair <selva.nair@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1519191510-3826-1-git-send-email-selva.nair@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg16513.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
diff --git a/src/openvpnserv/common.c b/src/openvpnserv/common.c index 6c29f57..dc47666 100644 --- a/src/openvpnserv/common.c +++ b/src/openvpnserv/common.c @@ -59,7 +59,7 @@ openvpn_sntprintf(LPTSTR str, size_t size, LPCTSTR format, ...) static DWORD GetRegString(HKEY key, LPCTSTR value, LPTSTR data, DWORD size, LPCTSTR default_value) { - LONG status = RegGetValue(key, NULL, value, RRF_RT_REG_SZ|RRF_RT_REG_EXPAND_SZ, + LONG status = RegGetValue(key, NULL, value, RRF_RT_REG_SZ, NULL, (LPBYTE) data, &size); if (status == ERROR_FILE_NOT_FOUND && default_value)