[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Freeipa-devel] [PATCH 0213] Fix crash caused by invalid data in SOA record



Hello,

Fix crash caused by invalid data in SOA record.

E.g. try to put '\0' to the idnsSOAmName attribute...

This patch should go to branches v3 and master.

--
Petr^2 Spacek

From b49bea1d803d6e2deb285ad13a84442512f25394 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspacek redhat com>
Date: Fri, 29 Nov 2013 16:54:36 +0100
Subject: [PATCH] Fix crash caused by invalid data in SOA record.

Signed-off-by: Petr Spacek <pspacek redhat com>
---
 src/ldap_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index f6e3c72e8395d3f2e90467934baf4fac1643208f..c107b06b3c628d35666c0d4f8f0019064aa7cc85 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -1690,7 +1690,7 @@ ldap_parse_rrentry(isc_mem_t *mctx, ldap_entry_t *entry, dns_name_t *origin,
 cleanup:
 	if (entry != NULL)
 		dn = entry->dn;
-	if (data_buf != NULL && str_buf(data_buf) != NULL)
+	if (data_buf != NULL && str_len(data_buf) != 0)
 		data_str = str_buf(data_buf);
 	log_error_r("failed to parse RR entry: dn '%s': data '%s'", dn, data_str);
 	str_destroy(&data_buf);
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]