svn commit: samba r16073 - in branches/SAMBA_4_0/source/libcli/ldap: .

abartlet at samba.org abartlet at samba.org
Wed Jun 7 04:23:43 GMT 2006


Author: abartlet
Date: 2006-06-07 04:23:42 +0000 (Wed, 07 Jun 2006)
New Revision: 16073

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16073

Log:
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


Modified:
   branches/SAMBA_4_0/source/libcli/ldap/ldap.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap.c	2006-06-07 04:16:02 UTC (rev 16072)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap.c	2006-06-07 04:23:42 UTC (rev 16073)
@@ -548,9 +548,9 @@
 	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;
 }



More information about the samba-cvs mailing list