[glib/glib-2-36] GSocks5Proxy: don't crash if parsing negotiation reply fails
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-36] GSocks5Proxy: don't crash if parsing negotiation reply fails
- Date: Thu, 2 May 2013 17:40:30 +0000 (UTC)
commit 0ba982e0589c2ae246dca760010d54bbca371399
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Thu May 2 16:50:01 2013 +0100
GSocks5Proxy: don't crash if parsing negotiation reply fails
The GError should be initialized to NULL, otherwise we'll
"pile up" errors, then try to free an uninitialized pointer.
Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
Reviewed-by: Dan Winship <danw gnome org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=699493
gio/gsocks5proxy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsocks5proxy.c b/gio/gsocks5proxy.c
index 9d9055f..0d6269e 100644
--- a/gio/gsocks5proxy.c
+++ b/gio/gsocks5proxy.c
@@ -708,7 +708,7 @@ nego_reply_read_cb (GObject *source,
if (data->offset == data->length)
{
- GError *error;
+ GError *error = NULL;
gboolean must_auth = FALSE;
gboolean has_auth = data->username || data->password;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]