]> git.sur5r.net Git - openldap/commitdiff
Avoid reference past end of array
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 5 Mar 2009 19:16:29 +0000 (19:16 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 5 Mar 2009 19:16:29 +0000 (19:16 +0000)
servers/slapd/modify.c

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