]> git.sur5r.net Git - openldap/commitdiff
Fix realloc bug and remove use of LDAP_MOD_BVALUES
authorKurt Zeilenga <kurt@openldap.org>
Wed, 19 Apr 2000 08:43:37 +0000 (08:43 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 19 Apr 2000 08:43:37 +0000 (08:43 +0000)
servers/slapd/back-shell/modify.c
servers/slapd/back-shell/result.c

index 5408a096da111d4e24b00f365f267c4fb3893676..7fc89258c3693c7d1984866de72668ff99062786 100644 (file)
@@ -44,7 +44,7 @@ shell_back_modify(
        print_suffixes( wfp, be );
        fprintf( wfp, "dn: %s\n", dn );
        for ( ; ml != NULL; ml = ml->ml_next ) {
-               switch ( ml->ml_op & ~LDAP_MOD_BVALUES ) {
+               switch ( ml->ml_op ) {
                case LDAP_MOD_ADD:
                        fprintf( wfp, "add: %s\n", ml->ml_type );
                        break;
@@ -70,5 +70,4 @@ shell_back_modify(
        read_and_send_results( be, conn, op, rfp, NULL, 0 );
        fclose( rfp );
        return( 0 );
-
 }
index 4d9f39c2f557b093fe63952e874ee4790c680604..c9bb6c4da3a430dd681f572c452144908675696e 100644 (file)
@@ -43,8 +43,10 @@ read_and_send_results(
                }
                len = strlen( line );
                while ( bp + len - buf > bsize ) {
+                       size_t offset = bp - buf;
                        bsize += BUFSIZ;
                        buf = (char *) ch_realloc( buf, bsize );
+                       bp = &buf[offset];
                }
                strcpy( bp, line );
                bp += len;