--On September 30, 2008 6:20:58 PM +0000 h.b.furuseth(a)usit.uio.no wrote:
> Yes. The calling order was incorrect. It is supposed to be
> ldap_utf8_strchr(s, brkstr).
No. Try this with the new code:
env LDAPHOST='host1 host2' valgrind clients/tools/ldapwhoami -x
It returns writes past malloced areas in ldap_str2charray().
options.c calls ldap_charray("host1 host2", ", ") to parse that.
It counted the number of commas and spaces in the host string.
With the new code, it instead sums up:
number of commas in "host1 host2"
+ number of commas in "ost1 host2"
+ number of commas in "st1 host2"
etc and you never count spaces.
So, the solution is to revert the order of the call, but leave the loop the
way it is now?
Principal Software Engineer
Zimbra :: the leader in open source messaging and collaboration