git.samba.org
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s4-ldb: allow for non-null terminated ldb_val in ldb_dn_from_ldb_val
[samba.git]
/
source4
/
lib
/
ldb
/
common
/
ldb_dn.c
diff --git
a/source4/lib/ldb/common/ldb_dn.c
b/source4/lib/ldb/common/ldb_dn.c
index fa3865e77f42daee248b4c4a8586b99c1a9f5d2d..2ba17b2a6b29595279a4d34ca35f916af4ae7385 100644
(file)
--- 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
if (! ldb) return NULL;
if (strdn && strdn->data
- && (str
len((const char*)strdn->data
) != strdn->length)) {
+ && (str
nlen((const char*)strdn->data, strdn->length
) != strdn->length)) {
/* The RDN must not contain a character with value 0x0 */
return NULL;
}
/* The RDN must not contain a character with value 0x0 */
return NULL;
}