quanah@OpenLDAP.org wrote:
Update of /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb
Modified Files: filterindex.c 1.68 -> 1.69
Log Message: ITS#5037 Move db == NULL check to correct spot
As we already discussed in IM, just re-ordering the tests is not sufficient. The actual test for db == NULL is wrong, you have to test the rc for the specific value (LDAP_INAPPROPRIATE_MATCHING). There are two problems - if bdb_index_param fails for any reason at all, it will not set the db, so you need to distinguish the serious failures from the benign ones. Also, if you examine the code for bdb_index_param, you'll see that it never touches the db parameter on failure, so it will remain uninitialized.