ITS#6233 don't advance ptr after storing final NUL.

This commit is contained in:
Howard Chu 2009-07-28 22:04:13 +00:00
parent 016c518652
commit 82874bed6e

View File

@ -2073,7 +2073,7 @@ print_deref( LDAP *ld, LDAPControl *ctrl )
}
ptr = lutil_strncopy( ptr, dr->derefVal.bv_val, dr->derefVal.bv_len );
*ptr++ = '\n';
*ptr++ = '\0';
*ptr = '\0';
assert( ptr <= buf + len );
tool_write_ldif( LDIF_PUT_COMMENT, NULL, buf, ptr - buf);