[glib] gsocks5proxy: Fix error reporting in authentication
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gsocks5proxy: Fix error reporting in authentication
- Date: Sat, 3 Oct 2015 10:47:51 +0000 (UTC)
commit 0f98b2f4ec683fc29bee489cafdbbdc7d59ffa1d
Author: Philip Withnall <philip withnall collabora co uk>
Date: Sat Oct 3 11:46:18 2015 +0100
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
gio/gsocks5proxy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsocks5proxy.c b/gio/gsocks5proxy.c
index d093c81..764f9cf 100644
--- a/gio/gsocks5proxy.c
+++ b/gio/gsocks5proxy.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]