gsocks5proxy: Fix error reporting in authentication

set_auth_msg() was returning FALSE to indicate error, but all its
callers were expecting a negative return value to indicate error. This
was causing memory leaks for the GError, and errors to not be reported.

Coverity CID: 1325357
This commit is contained in:
Philip Withnall 2015-10-03 11:46:18 +01:00
parent c1c001e300
commit 0f98b2f4ec

View File

@ -205,7 +205,7 @@ set_auth_msg (guint8 *msg,
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PROXY_FAILED,
_("Username or password is too long for SOCKSv5 "
"protocol."));
return FALSE;
return -1;
}
msg[len++] = SOCKS5_AUTH_VERSION;