Implemented safe user buffer copying.