]> 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)
committerHoward Chu <hyc@openldap.org>
Tue, 18 Jun 2024 16:14:12 +0000 (17:14 +0100)
servers/slapd/slapadd.c

index fb4ab45e6e77aacbc506f15edc66fdd2dbfcb070..62864faad3affc8d1981e24f2c8295bc9c12bf16 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;