diff options
author | Nathan Kinder <nkinder@redhat.com> | 2005-08-15 20:59:27 +0000 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2005-08-15 20:59:27 +0000 |
commit | ad01ce06fd32da96a90b47659c09393e22d5def8 (patch) | |
tree | bce5396a5137b68b3b5496c96015eea94e8fb376 | |
parent | 55f7aefcdd89022d8325085fbbca1980198b7f70 (diff) | |
download | ds-ad01ce06fd32da96a90b47659c09393e22d5def8.tar.gz ds-ad01ce06fd32da96a90b47659c09393e22d5def8.tar.xz ds-ad01ce06fd32da96a90b47659c09393e22d5def8.zip |
166012 - Use of incorrect iterator in indexing code was causing illegal access of memory which sometimes resulted in crashing.
-rw-r--r-- | ldap/servers/slapd/back-ldbm/index.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c index b5637032..750c1041 100644 --- a/ldap/servers/slapd/back-ldbm/index.c +++ b/ldap/servers/slapd/back-ldbm/index.c @@ -639,8 +639,12 @@ index_add_mods( * removed. */ slapi_entry_attr_find( olde->ep_entry, mods[i]->mod_type, &curr_attr); - if ( valuearray_find(curr_attr, evals, mods_valueArray[i]) == -1 ) { - flags |= BE_INDEX_EQUALITY; + for (j = 0; mods_valueArray[j] != NULL; j++ ) { + if ( valuearray_find(curr_attr, evals, mods_valueArray[j]) == -1 ) { + if (!(flags & BE_INDEX_EQUALITY)) { + flags |= BE_INDEX_EQUALITY; + } + } } rc = index_addordel_values_sv( be, basetype, |