summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Boukris <iboukris@gmail.com>2020-06-20 17:17:33 +0200
committerKarolin Seeger <kseeger@samba.org>2020-06-24 09:57:27 +0000
commit0ac77960440f69e47ad52f134ecc95133c3c2353 (patch)
tree8b376e361814c670f2e62045a7dba79ce6bab679
parent0e668997c83bcd4c736a86bd78803992225fd4dd (diff)
downloadsamba-0ac77960440f69e47ad52f134ecc95133c3c2353.tar.gz
Fix usage of ldap_get_values_len for msDS-AdditionalDnsHostName
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14406 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jun 22 09:59:04 UTC 2020 on sn-devel-184
-rwxr-xr-xsource3/libads/ldap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index ed52d4a969e..7ef7e7e8420 100755
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -3691,8 +3691,12 @@ static char **get_addl_hosts(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
}
for (i = 0; i < *num_values; i++) {
- if (!pull_utf8_talloc(mem_ctx, &ret[i], values[i]->bv_val,
- &converted_size)) {
+ ret[i] = NULL;
+ if (!convert_string_talloc(mem_ctx, CH_UTF8, CH_UNIX,
+ values[i]->bv_val,
+ strnlen(values[i]->bv_val,
+ values[i]->bv_len),
+ &ret[i], &converted_size)) {
ldap_value_free_len(values);
return NULL;
}