~ubuntu-branches/ubuntu/maverick/openldap/maverick-proposed

« back to all changes in this revision

Viewing changes to servers/slapd/back-ldap/search.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-09-07 13:41:10 UTC
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: james.westby@ubuntu.com-20090907134110-jsdrvn0atu1fex4m
Tags: upstream-2.4.18
ImportĀ upstreamĀ versionĀ 2.4.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* search.c - ldap backend search function */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/back-ldap/search.c,v 1.201.2.21 2009/03/06 07:14:56 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/back-ldap/search.c,v 1.201.2.22 2009/08/25 22:58:09 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
5
 * Copyright 1999-2009 The OpenLDAP Foundation.
832
832
                                        LBER_FREE( attr->a_nvals[i].bv_val );
833
833
                                LBER_FREE( attr->a_vals[i].bv_val );
834
834
                                attr->a_numvals--;
835
 
                                if ( i < attr->a_numvals ) {
 
835
 
 
836
                                assert( i >= 0 );
 
837
                                if ( (unsigned)i < attr->a_numvals ) {
836
838
                                        attr->a_vals[i] = attr->a_vals[attr->a_numvals];
837
839
                                        if ( attr->a_nvals != attr->a_vals )
838
840
                                                attr->a_nvals[i] = attr->a_nvals[attr->a_numvals];