Skip to content
Snippets Groups Projects
Commit 01de012e authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix realloc bug and remove use of LDAP_MOD_BVALUES

parent 51993c8e
Branches
Tags
No related merge requests found
......@@ -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 );
}
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment