]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10231 slapadd: check for NULL suffix in error message
authorHoward Chu <hyc@openldap.org>
Tue, 18 Jun 2024 16:14:12 +0000 (17:14 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 28 Jun 2024 17:02:46 +0000 (17:02 +0000)
servers/slapd/slapadd.c

index 9e75b0019f917973164f0f2498abd65a196e08a8..fda682926a28e4b087eca250aa150d309af47a36 100644 (file)
@@ -172,7 +172,8 @@ again:
                                "database #%d (%s) not configured to hold \"%s\"",
                                progname, erec->lineno,
                                dbnum,
-                               be->be_suffix[0].bv_val,
+                               ( be->be_suffix && be->be_suffix[0].bv_val ) ?
+                                       be->be_suffix[0].bv_val : "(null)",
                                e->e_dn );
                        if ( bd ) {
                                BackendDB *bdtmp;