cifs: refactor create_sd_buf() and and avoid corrupting the buffer