summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/rawrequest.c2
-rw-r--r--source4/libcli/raw/rawsearch.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 89155451da..dd21eb89ea 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -548,7 +548,7 @@ static size_t smbcli_req_pull_ucs2(struct smbcli_request *req, TALLOC_CTX *mem_c
of bytes consumed in the packet is returned
*/
size_t smbcli_req_pull_ascii(struct smbcli_request *req, TALLOC_CTX *mem_ctx,
- char **dest, const char *src, int byte_len, uint_t flags)
+ char **dest, const char *src, int byte_len, uint_t flags)
{
int src_len, src_len2;
ssize_t ret;
diff --git a/source4/libcli/raw/rawsearch.c b/source4/libcli/raw/rawsearch.c
index df44dbffa4..dd8904dfd1 100644
--- a/source4/libcli/raw/rawsearch.c
+++ b/source4/libcli/raw/rawsearch.c
@@ -42,6 +42,8 @@ static void smb_raw_search_backend(struct smbcli_request *req,
p = req->in.data + 3;
for (i=0; i < count; i++) {
+ char *name;
+
search_data.search.id.reserved = CVAL(p, 0);
memcpy(search_data.search.id.name, p+1, 11);
search_data.search.id.handle = CVAL(p, 12);
@@ -51,7 +53,8 @@ static void smb_raw_search_backend(struct smbcli_request *req,
search_data.search.write_time = raw_pull_dos_date(req->transport,
p + 22);
search_data.search.size = IVAL(p, 26);
- smbcli_req_pull_ascii(req, mem_ctx, &search_data.search.name, p+30, 13, STR_ASCII);
+ smbcli_req_pull_ascii(req, mem_ctx, &name, p+30, 13, STR_ASCII);
+ search_data.search.name = name;
if (!callback(private, &search_data)) {
break;
}