diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-21 22:18:16 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-10-21 22:43:58 +1100 |
commit | 1467e5eaab24b2b5c90ba0dd4e9dad4f321568c3 (patch) | |
tree | 6bb30f3df90ca2b9a1635a5cdb927b81cf63038c | |
parent | 16a80f17425c5de9d0bd52494e3e26a6840cfd7d (diff) | |
download | samba-1467e5eaab24b2b5c90ba0dd4e9dad4f321568c3.tar.gz samba-1467e5eaab24b2b5c90ba0dd4e9dad4f321568c3.tar.bz2 samba-1467e5eaab24b2b5c90ba0dd4e9dad4f321568c3.zip |
s4-ldb: allow for non-null terminated ldb_val in ldb_dn_from_ldb_val
The strlen() could go past the end of a non-null terminated value
-rw-r--r-- | source4/lib/ldb/common/ldb_dn.c | 2 |
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; } |