[Date Prev][Date Next]
failed assertion `LBER_VALID( ber )'
I'm having a strange problem with OpenLDAP 2.1.23.
I am programming in c and when I try to bind I get the following error
../../../../src/libraries/libldap/sasl.c:99: failed assertion
`LBER_VALID( ber )'
Abort (core dumped)
Here is the code I am running
#include <lber.h> // for ldap
int main(int argc, char * argv)
LDAP * ld;
ld = ldap_init("manheru",2002);
cout << "error in init." << endl;
ldap_perror(ld, "bad init:");
//this line is the problem
int errorCode = ldap_simple_bind_s(ld,"name","password");
cout << ldap_err2string(errorCode) << endl;
The crash occurs when I use ldap_bind as well, and with both synchronous
and ansynchrnous binding.
It also doesn't matter what I pass for name and password. It crashes
ldapsearch, ldapadd etc work fine even though they call the same functions.
I was also able to bind with the java LDAP library.
We are running it on a sun machine
info: SunOS manheru 5.9 Generic_112233-07 sun4u sparc SUNW,Ultra-80 Solaris
For compiling I'm using g++
any help, or suggestions will be greatly appreciated.