X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fgetentry.c;h=37e601a6f521513f0491886cf58c3b212ddd3e08;hb=b4243bc119b2f88318103176c7c671662c9ff371;hp=09721f1d8e991fcc90b570db2c8e03db53f89270;hpb=403f4479bc9f9a864122d4aeecf7284408918302;p=openldap diff --git a/libraries/libldap/getentry.c b/libraries/libldap/getentry.c index 09721f1d8e..37e601a6f5 100644 --- a/libraries/libldap/getentry.c +++ b/libraries/libldap/getentry.c @@ -1,6 +1,6 @@ /* $OpenLDAP$ */ /* - * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* Portions @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -99,13 +98,13 @@ ldap_get_entry_controls( assert( sctrls != NULL ); if ( ld == NULL || sctrls == NULL || - entry == NULL || entry->lm_msgtype == LDAP_RES_SEARCH_ENTRY ) + entry == NULL || entry->lm_msgtype != LDAP_RES_SEARCH_ENTRY ) { return LDAP_PARAM_ERROR; } /* make a local copy of the BerElement */ - SAFEMEMCPY(&be, entry->lm_ber, sizeof(be)); + AC_MEMCPY(&be, entry->lm_ber, sizeof(be)); if ( ber_scanf( &be, "{xx" /*}*/ ) == LBER_ERROR ) { rc = LDAP_DECODING_ERROR;