summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2015-12-22 17:10:14 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-03-09 10:32:16 +0100
commitd2c6f7624b802825f0fa711a6254f16de071814d (patch)
tree787791de0b8a9d7bb9cda4f589117d2220b1aa7d /source4/libcli
parent5421d7070a8925104d9abc2039202983135acf64 (diff)
downloadsamba-d2c6f7624b802825f0fa711a6254f16de071814d.tar.gz
ldap VLV: memdup, not strdup VLV context_id
The context ID is not a text string, it is an opaque binary field. Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/ldap/ldap_controls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/ldap/ldap_controls.c b/source4/libcli/ldap/ldap_controls.c
index 6a4af70d884..0a23cc79a47 100644
--- a/source4/libcli/ldap/ldap_controls.c
+++ b/source4/libcli/ldap/ldap_controls.c
@@ -675,7 +675,7 @@ static bool decode_vlv_response(void *mem_ctx, DATA_BLOB in, void *_out)
if (!asn1_read_OctetString(data, mem_ctx, &context_id)) {
return false;
}
- lvrc->contextId = talloc_strndup(lvrc, (const char *)context_id.data, context_id.length);
+ lvrc->contextId = talloc_memdup(lvrc, (const char *)context_id.data, context_id.length);
if (!lvrc->contextId) {
return false;
}