Blame SOURCES/0001-adcli_conn_is_writeable-do-not-crash-id-domain_disco.patch

59dcbd
From 05eae8a57a556412aa18d37660ebfabb74ab2890 Mon Sep 17 00:00:00 2001
59dcbd
From: Sumit Bose <sbose@redhat.com>
59dcbd
Date: Thu, 31 May 2018 17:01:36 +0200
59dcbd
Subject: [PATCH] adcli_conn_is_writeable: do not crash id domain_disco is
59dcbd
 missing
59dcbd
59dcbd
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1575554
59dcbd
---
59dcbd
 library/adconn.c | 9 +++++++--
59dcbd
 1 file changed, 7 insertions(+), 2 deletions(-)
59dcbd
59dcbd
diff --git a/library/adconn.c b/library/adconn.c
59dcbd
index d2fb1d5..e2250e3 100644
59dcbd
--- a/library/adconn.c
59dcbd
+++ b/library/adconn.c
59dcbd
@@ -1567,6 +1567,11 @@ adcli_conn_server_has_capability (adcli_conn *conn,
59dcbd
 
59dcbd
 bool adcli_conn_is_writeable (adcli_conn *conn)
59dcbd
 {
59dcbd
-    disco_dance_if_necessary (conn);
59dcbd
-    return ( (conn->domain_disco->flags & ADCLI_DISCO_WRITABLE) != 0);
59dcbd
+	disco_dance_if_necessary (conn);
59dcbd
+
59dcbd
+	if (conn->domain_disco == NULL) {
59dcbd
+		return false;
59dcbd
+	}
59dcbd
+
59dcbd
+	return ( (conn->domain_disco->flags & ADCLI_DISCO_WRITABLE) != 0);
59dcbd
 }
59dcbd
-- 
59dcbd
2.14.4
59dcbd