From c38f24b0210cb98b5062f3e0c92be9a9177e1bb7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 7 Jun 2006 04:23:42 +0000 Subject: 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) --- source4/libcli/ldap/ldap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli/ldap') 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; } -- cgit