summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-07 04:23:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:57 -0500
commitc38f24b0210cb98b5062f3e0c92be9a9177e1bb7 (patch)
treef39d435e0d052bdc41fcd71981c6b5a8188e1d6b
parent9f6884df6a1d3eb11bd1ed030424ea18c786c178 (diff)
downloadsamba-c38f24b0210cb98b5062f3e0c92be9a9177e1bb7.tar.gz
samba-c38f24b0210cb98b5062f3e0c92be9a9177e1bb7.tar.bz2
samba-c38f24b0210cb98b5062f3e0c92be9a9177e1bb7.zip
r16073: On an incoming wildcard search, it is critical that the size be
correct, or we try and do a memcmp on the trailing '\0'. This happens because we now use memcmp for the prefix matching. I just wish I had a test other than a particular invocation of the OSX client. (I've tried and failed so far) Andrew Bartlett (This used to be commit 36aa8390807581442c68ac3ee9dd6eb05d89b86d)
-rw-r--r--source4/libcli/ldap/ldap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 6f475478b1..6a0b86f78b 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -548,9 +548,9 @@ static struct ldb_val **ldap_decode_substring(TALLOC_CTX *mem_ctx, struct ldb_va
if (chunks[chunk_num]->data == NULL) {
return NULL;
}
- chunks[chunk_num]->length = strlen(value) + 1;
+ chunks[chunk_num]->length = strlen(value);
- chunks[chunk_num + 1] = NULL;
+ chunks[chunk_num + 1] = '\0';
return chunks;
}