From: Kurt Zeilenga Date: Wed, 19 Apr 2000 08:43:37 +0000 (+0000) Subject: Fix realloc bug and remove use of LDAP_MOD_BVALUES X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3098 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=01de012e1c497fbf1e69d8721565a065b4349d4e;p=openldap Fix realloc bug and remove use of LDAP_MOD_BVALUES --- diff --git a/servers/slapd/back-shell/modify.c b/servers/slapd/back-shell/modify.c index 5408a096da..7fc89258c3 100644 --- a/servers/slapd/back-shell/modify.c +++ b/servers/slapd/back-shell/modify.c @@ -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 ); - } diff --git a/servers/slapd/back-shell/result.c b/servers/slapd/back-shell/result.c index 4d9f39c2f5..c9bb6c4da3 100644 --- a/servers/slapd/back-shell/result.c +++ b/servers/slapd/back-shell/result.c @@ -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;