From: Pierangelo Masarati Date: Thu, 3 Apr 2003 22:54:51 +0000 (+0000) Subject: anyone knows a safer way to skip a tag? X-Git-Tag: AUTOCONF_2_57~93 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=811929011d6a0967d737eaf6c1acc76decb91893;p=openldap anyone knows a safer way to skip a tag? --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 81cb8e18a9..945649d180 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -468,7 +468,7 @@ ldap_build_entry( /* no subschemaSubentry */ if ( attr->a_desc == slap_schema.si_ad_subschemaSubentry ) { - ber_len_t len; + BerVarray vals; /* * We eat target's subschemaSubentry because @@ -477,7 +477,11 @@ ldap_build_entry( * later, the local subschemaSubentry is * added. */ - ber_skip_tag( &ber, &len ); + ( void )ber_scanf( &ber, "[W]", &vals ); + for ( bv = vals; bv->bv_val; bv++ ) { + LBER_FREE( bv->bv_val ); + } + LBER_FREE( vals ); ch_free(attr); continue;