summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/common/ldb_dn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index fa3865e77f..2ba17b2a6b 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -98,7 +98,7 @@ struct ldb_dn *ldb_dn_from_ldb_val(void *mem_ctx,
if (! ldb) return NULL;
if (strdn && strdn->data
- && (strlen((const char*)strdn->data) != strdn->length)) {
+ && (strnlen((const char*)strdn->data, strdn->length) != strdn->length)) {
/* The RDN must not contain a character with value 0x0 */
return NULL;
}