[Date Prev][Date Next] [Chronological] [Thread] [Top]

program segfaults on ldap_get_values/ldap_get_values_len

I'm trying to access LDAP from a C program (the first time I've used
the OpenLDAP API) and so far I've only met with moderate success.

I can bind without issue, but I need to retrieve the values held by a
specific multi valued attribute, and that's where I'm having issues.

I was using ldap_get_values() and all the other deprecated functions, but
have recently converted my code to only use what's available in 2.4.x

Sadly, that didn't fix the problem, it still happens.

This line:

attr_values = ldap_get_values_len(ldap_conn, entry, attr);

Segfaults with SIGABRT and prints this to stderr:

Assertion failed: (LBER_VALID( ber )), function ber_scanf, file decode.c, line 779.

This is OpenLDAP 2.4.8 on FreeBSD 7.0-RELEASE (as built out of PORTS).

Where do I start looking to try and get this resolved?


"Perl can be fast and elegant as much as J2EE can be fast and elegant.
In the hands of a skilled artisan, it can and does happen; it's just
that most of the shit out there is built by people who'd be better
suited to making sure that my burger is cooked thoroughly."  -- Jonathan Patschke