[Date Prev][Date Next]
ldap_search_s SegFaults on Linux
I'm in a mid-size trouble...
I have a piece of code which just builds a filter fitting my needs
and returns that to a function which immediately calls ldap_search_s().
The problem is...I'm getting a segmentation fault on ldap_search_s().
The problem is with the filter but I don't know what is the problem.
If I pass the filter string directly to ldap_search_s(...,
"filterstring",...) the code works fine. Also if immediately before I
return the filter string, I make a strcpy(filter, "filterstring"), the
code will work fine. I just don't understand what's happening there.
My guess is that the problem is with OpenLDAP 1.2.9, it works preety
OpenLDAP 1.2.9 and 1.2.13 (tested on both)
Authentication Test Results:
M1 -> M2 = Error
M1 -> M3 = OK
M1 -> M4 = Error
M3 -> M2 = OK
M3 -> M3 = OK
M3 -> M4 = OK
M4 -> M2 = OK
Finally, my string is about 287 chars long and the buffer dinamically
allocated for it is about 45x chars long. The buffer was allocated with
Do you have any comments on this?? I just cannot change M2 and M3 to
OpenLDAP 1.2.13 because they are both production boxes.
Please, any help is welcome!!!
Perl combines all of the worst aspects of BASIC, C and line noise.
-- Keith Packard