Whenever I search in the Nickname field and no results are returned, the jabberd process segfaults. It does not happen in any of the other fields.

What was happening in ljud_search.c:

Line 307: if ( ldap_count_values(vals) ) ldap_value_free(vals);

Line 307 is where the script was crashing if the nickname didn't return results. ldap_count_values(vals) was 1 and ldap_value_free then crashed. However, vals should not be set, as it is not for any other search that didn't return anything. What is vals then, I suspect some garbage?

Solution:
Changed line 53 from:
    char **vals;
To:
    char **vals = NULL;

I don't know why or how, it just worked for us.

Thanks,
Jeff Hoover

_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev

Reply via email to