summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_ldif.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common/ldb_ldif.c')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index 38866d7031..a5768b9796 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -590,6 +590,12 @@ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
msg->dn = ldb_dn_explode(msg, value.data);
+ if (msg->dn == NULL) {
+ ldb_debug(ldb, LDB_DEBUG_ERROR, "Error: Unable to parse dn '%s'\n",
+ value.data);
+ goto failed;
+ }
+
while (next_attr(ldif, &s, &attr, &value) == 0) {
const struct ldb_attrib_handler *h;
struct ldb_message_element *el;