[glib-networking/mcatanzaro/base-rebase: 17/40] base: Fix uninitialized memory use on cancellation
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/mcatanzaro/base-rebase: 17/40] base: Fix uninitialized memory use on cancellation
- Date: Wed, 8 May 2019 22:11:40 +0000 (UTC)
commit 143f8ed99506923376ef6f5ae222acf6f4cf82ce
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Apr 4 22:27:24 2019 -0500
base: Fix uninitialized memory use on cancellation
Port of eb24905fece641194bad91e8fe6e073dd324023a
tls/base/gtlsconnection-base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index f94341b..4353694 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -403,7 +403,7 @@ claim_op (GTlsConnectionBase *tls,
GPollFD fds[2];
int nfds;
gint64 start_time;
- gint result;
+ gint result = 1; /* if the loop is never entered, it's as if we cancelled early */
g_cancellable_reset (tls->waiting_for_op);
@@ -920,7 +920,7 @@ g_tls_connection_base_condition_wait (GDatagramBased *datagram_based,
GTlsConnectionBase *tls = G_TLS_CONNECTION_BASE (datagram_based);
GPollFD fds[2];
guint n_fds;
- gint result;
+ gint result = 1; /* if the loop is never entered, it's as if we cancelled early */
gint64 start_time;
if (g_cancellable_set_error_if_cancelled (cancellable, error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]