Avoid reference past end of array

This commit is contained in:
Howard Chu 2009-02-26 04:13:20 +00:00
parent e5e9191aeb
commit 72fb4246d6

View 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 */