]> git.sur5r.net Git - openldap/commitdiff
Avoid reference past end of array
authorHoward Chu <hyc@openldap.org>
Thu, 26 Feb 2009 04:13:20 +0000 (04:13 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 26 Feb 2009 04:13:20 +0000 (04:13 +0000)
servers/slapd/modify.c

index 7adc30469c34ceeb1d5b24b6cc94f7b0a05f3299..25c448066389cb74b851210238f714b3be1feeb6 100644 (file)
@@ -808,7 +808,7 @@ slap_sort_vals(
                }
        }
        done:
-       if ( i >= 0 )
+       if ( rc == LDAP_TYPE_OR_VALUE_EXISTS && i >= 0 )
                *dup = ix[i];
 
        /* For sorted attributes, put the values in index order */