From b4eee348c4d36e67ba83651c250366e84e7125dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Jun 2005 10:38:06 +0000 Subject: r7720: - simplify the asn1 decode of ldap_search() a lot, taking advantage of the fact that the ldap data structures now use ldb_message_element. - fixed null termination of elements in ildap (This used to be commit 09060994c1ed12073ae6e1131d7074db8fdc523c) --- source4/libcli/ldap/ldap_msg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/libcli/ldap/ldap_msg.c') diff --git a/source4/libcli/ldap/ldap_msg.c b/source4/libcli/ldap/ldap_msg.c index 901c42a62a..9b531f3138 100644 --- a/source4/libcli/ldap/ldap_msg.c +++ b/source4/libcli/ldap/ldap_msg.c @@ -43,8 +43,9 @@ BOOL add_value_to_attrib(TALLOC_CTX *mem_ctx, struct ldb_val *value, if (attrib->values == NULL) return False; - attrib->values[attrib->num_values] = - data_blob_talloc(attrib->values, value->data, value->length); + attrib->values[attrib->num_values].data = talloc_steal(attrib->values, + value->data); + attrib->values[attrib->num_values].length = value->length; attrib->num_values += 1; return True; } -- cgit