aboutsummaryrefslogtreecommitdiff
path: root/service-win32
diff options
context:
space:
mode:
authorSamuli Seppänen <samuli@openvpn.net>2011-02-18 11:39:27 +0200
committerDavid Sommerseth <davids@redhat.com>2011-02-28 11:25:26 +0100
commit77d24405096452541700fb24aacd6f8a589fce3b (patch)
treeceee0cc3934cd5cffa89745c022dfc2fbb58e22e /service-win32
parentChanges to buildsystem patchset (diff)
downloadopenvpn-77d24405096452541700fb24aacd6f8a589fce3b.tar.xz
Temporary snprintf-related fix to service-win32/openvpnserv.c
This is intended just as a TEMPORARY solution to get the 2.2-RC released. The intesion is to get this fixed with a better solution for the final 2.2 release. This patch has also been discussed here: http://thread.gmane.org/gmane.network.openvpn.devel/4325/ The only reason for this patch to be accepted in its current shape, is that it will be fixed before the final 2.2 release. Signed-off-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'service-win32')
-rwxr-xr-xservice-win32/openvpnserv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/service-win32/openvpnserv.c b/service-win32/openvpnserv.c
index 07374e2..d0cfd9b 100755
--- a/service-win32/openvpnserv.c
+++ b/service-win32/openvpnserv.c
@@ -86,7 +86,7 @@ static HANDLE exit_event = NULL;
/* snprintf with guaranteed null termination */
#define mysnprintf(out, ...) \
{ \
- snprintf (out, sizeof(out), __VA_ARGS__); \
+ _snprintf (out, sizeof(out), __VA_ARGS__); \
out [sizeof (out) - 1] = '\0'; \
}
@@ -275,7 +275,6 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv)
LONG status;
DWORD len;
DWORD type;
- char error_string[256];
static const char error_format_str[] =
"Error querying registry key of type REG_SZ: HKLM\\" REG_KEY "\\%s";