[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm index.c, 1.7, 1.8

Nathan Kinder (nkinder) fedora-directory-commits at redhat.com
Mon Aug 15 20:59:30 UTC 2005


Author: nkinder

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31167

Modified Files:
	index.c 
Log Message:
166012 - Use of incorrect iterator in indexing code was causing illegal access of memory which sometimes resulted in crashing.


Index: index.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/index.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- index.c	12 Aug 2005 19:07:37 -0000	1.7
+++ index.c	15 Aug 2005 20:59:27 -0000	1.8
@@ -639,8 +639,12 @@
 		 * 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,




More information about the Fedora-directory-commits mailing list