Add the strlen to push to smb_bytes_push_str, return the converted size
[metze/samba/wip.git] / source3 / libsmb / clitrans.c
index baa73aeb14e199c03754d028b14af30558ed9f1b..4a0fc5f6e91f4f1979d28479ff956229984ace60 100644 (file)
@@ -765,9 +765,9 @@ static struct async_req *cli_ship_trans(TALLOC_CTX *mem_ctx,
                if (bytes == NULL) {
                        goto fail;
                }
-               bytes = smb_bytes_push_str(
-                       bytes, (state->cli->capabilities & CAP_UNICODE) != 0,
-                       state->pipe_name);
+               bytes = smb_bytes_push_str(bytes, cli_ucs2(state->cli),
+                                          state->pipe_name,
+                                          strlen(state->pipe_name)+1, NULL);
                if (bytes == NULL) {
                        goto fail;
                }