From 77d24405096452541700fb24aacd6f8a589fce3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuli=20Sepp=C3=A4nen?= Date: Fri, 18 Feb 2011 11:39:27 +0200 Subject: Temporary snprintf-related fix to service-win32/openvpnserv.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: David Sommerseth Signed-off-by: David Sommerseth --- service-win32/openvpnserv.c | 3 +-- 1 file changed, 1 insertion(+), 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"; -- cgit v1.2.3