From: Howard Chu Date: Thu, 26 Feb 2009 04:13:20 +0000 (+0000) Subject: Avoid reference past end of array X-Git-Tag: ACLCHECK_0~783 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=72fb4246d65b3515286ab178702606ca75ff420f;p=openldap Avoid reference past end of array --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 7adc30469c..25c4480663 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -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 */