mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
lib/ldb: Use talloc_memdup() because we know the length of the attribute already
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11602 Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
8731e0c6cd
commit
8644dd4e52
@ -373,7 +373,7 @@ int ldb_unpack_data_only_attr_list(struct ldb_context *ldb,
|
||||
}
|
||||
}
|
||||
element = &message->elements[nelem];
|
||||
element->name = talloc_strndup(message->elements, attr, attr_len);
|
||||
element->name = talloc_memdup(message->elements, attr, attr_len+1);
|
||||
|
||||
if (element->name == NULL) {
|
||||
errno = ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user