summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/rawfileinfo.c4
-rw-r--r--source4/libcli/smb2/request.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index 5efa4dd337..50a6731ba4 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -51,6 +51,8 @@ NTSTATUS smbcli_parse_stream_info(DATA_BLOB blob, TALLOC_CTX *mem_ctx,
uint32_t nlen, len;
bool ret;
void *vstr;
+ size_t converted_size = 0;
+
io->streams =
talloc_realloc(mem_ctx, io->streams, struct stream_struct, n+1);
if (!io->streams) {
@@ -64,7 +66,7 @@ NTSTATUS smbcli_parse_stream_info(DATA_BLOB blob, TALLOC_CTX *mem_ctx,
}
ret = convert_string_talloc(io->streams,
CH_UTF16, CH_UNIX,
- blob.data+ofs+24, nlen, &vstr, NULL);
+ blob.data+ofs+24, nlen, &vstr, &converted_size);
if (!ret) {
return NT_STATUS_ILLEGAL_CHARACTER;
}
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c
index bf96d05bea..729b003aed 100644
--- a/source4/libcli/smb2/request.c
+++ b/source4/libcli/smb2/request.c
@@ -686,6 +686,7 @@ NTSTATUS smb2_pull_o16s16_string(struct smb2_request_buffer *buf, TALLOC_CTX *me
DATA_BLOB blob;
NTSTATUS status;
void *vstr;
+ size_t converted_size = 0;
bool ret;
status = smb2_pull_o16s16_blob(buf, mem_ctx, ptr, &blob);
@@ -705,7 +706,7 @@ NTSTATUS smb2_pull_o16s16_string(struct smb2_request_buffer *buf, TALLOC_CTX *me
}
ret = convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX,
- blob.data, blob.length, &vstr, NULL);
+ blob.data, blob.length, &vstr, &converted_size);
data_blob_free(&blob);
(*str) = (char *)vstr;
if (!ret) {