]> git.sur5r.net Git - openldap/commitdiff
ITS#5077 fix attr_cmp loop termination
authorHoward Chu <hyc@openldap.org>
Fri, 10 Aug 2007 23:10:59 +0000 (23:10 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 10 Aug 2007 23:10:59 +0000 (23:10 +0000)
servers/slapd/syncrepl.c

index 6e3d661473bb5cce7626848f225d3beefda99168..426d40cbdfaad852bd95bf02a713167299dfa611 100644 (file)
@@ -2699,7 +2699,9 @@ attr_cmp( Operation *op, Attribute *old, Attribute *new,
                                dels[d++] = i++;
                                continue;
                        }
-                       for ( k = i + 1; k < o; k++ ) {
+                       /* old value still exists, move to next */
+                       i++;
+                       for ( k = i; k < o; k++ ) {
                                if ( bvmatch( &old->a_vals[k], &new->a_vals[j] ) ) {
                                        break;
                                }