From 614d936ef4b868e5c8cd8e3c7e0ce4c33447e492 Mon Sep 17 00:00:00 2001
From: Pierangelo Masarati <ando@openldap.org>
Date: Thu, 28 Jul 2005 16:54:49 +0000
Subject: [PATCH] suffix must be present (ITS#3901)

---
 servers/slapd/back-bdb/init.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c
index 282503a75e..581fe1abd6 100644
--- a/servers/slapd/back-bdb/init.c
+++ b/servers/slapd/back-bdb/init.c
@@ -270,6 +270,13 @@ bdb_db_open( BackendDB *be )
 	char path[MAXPATHLEN];
 	char *ptr;
 
+	if ( be->be_suffix == NULL ) {
+		Debug( LDAP_DEBUG_ANY,
+			"bdb_db_open: need suffix\n",
+			0, 0, 0 );
+		return -1;
+	}
+
 	Debug( LDAP_DEBUG_ARGS,
 		"bdb_db_open: %s\n",
 		be->be_suffix[0].bv_val, 0, 0 );
-- 
GitLab