https://bugs.openldap.org/show_bug.cgi?id=10147
--- Comment #1 from Howard Chu hyc@openldap.org --- Nothing like you describe has ever been reported before. ldap_sasl_bind() doesn't parse the DN at all, it is passed as-is to the underlying socket.
I suggest you single-step with a debugger through the code to see where things are going wrong. Turning on the debug flags in libldap may help reveal some information as well.