]> git.sur5r.net Git - openldap/commitdiff
anyone knows a safer way to skip a tag?
authorPierangelo Masarati <ando@openldap.org>
Thu, 3 Apr 2003 22:54:51 +0000 (22:54 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 3 Apr 2003 22:54:51 +0000 (22:54 +0000)
servers/slapd/back-ldap/search.c

index 81cb8e18a9425d538666e255e022367e515f884b..945649d180c563ca01592c1adddb962fc3361ea4 100644 (file)
@@ -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;