mirror of
https://github.com/samba-team/samba.git
synced 2025-01-20 14:03:59 +03:00
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
This commit is contained in:
parent
16a80f1742
commit
1467e5eaab
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user