]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed an issue causing a build failure with MS Visual Studio 2008.
authorSamuli Seppänen <samuli@openvpn.net>
Thu, 25 Nov 2010 19:48:34 +0000 (21:48 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 25 Nov 2010 20:27:13 +0000 (21:27 +0100)
The new SOCKS auth code in socks.c contained a call to sprintf instead of
openvpn_sprintf. This caused build to fail if MS Visual Studio 2008 C compiler
was used. This change fixes that issue.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
socks.c

diff --git a/socks.c b/socks.c
index c7c0473c7a8adc9890d90d6bea60b0d956d29ecf..41e591add3510f0722c5ce35c46b8f813caac743 100644 (file)
--- a/socks.c
+++ b/socks.c
@@ -121,7 +121,7 @@ socks_username_password_auth (struct socks_proxy_info *p,
                "Authentication not possible.");
           return false;
   }
-  snprintf (to_send, sizeof (to_send), "\x01%c%s%c%s", (int) strlen(creds.username),
+  openvpn_snprintf (to_send, sizeof (to_send), "\x01%c%s%c%s", (int) strlen(creds.username),
             creds.username, (int) strlen(creds.password), creds.password);
   size = send (sd, to_send, strlen(to_send), MSG_NOSIGNAL);