aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/socks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvpn/socks.c')
-rw-r--r--src/openvpn/socks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openvpn/socks.c b/src/openvpn/socks.c
index d842666..b046910 100644
--- a/src/openvpn/socks.c
+++ b/src/openvpn/socks.c
@@ -109,8 +109,11 @@ socks_username_password_auth(struct socks_proxy_info *p,
"Authentication not possible.");
goto cleanup;
}
- openvpn_snprintf(to_send, sizeof(to_send), "\x01%c%s%c%s", (int) strlen(creds.username),
- creds.username, (int) strlen(creds.password), creds.password);
+ int sret = openvpn_snprintf(to_send, sizeof(to_send), "\x01%c%s%c%s",
+ (int) strlen(creds.username), creds.username,
+ (int) strlen(creds.password), creds.password);
+ ASSERT(sret <= sizeof(to_send));
+
size = send(sd, to_send, strlen(to_send), MSG_NOSIGNAL);
if (size != strlen(to_send))