summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-03-29 11:16:26 -0700
committerJeremy Allison <jra@samba.org>2011-03-29 21:01:49 +0200
commit0c5214e2eb6249914230f092fe35dfa49da24c34 (patch)
treea7e0b1952b1993e1859a6653fc38caf2501e6858 /source4/libcli/raw
parent1e50f9a5c263ed19ef8e9c689c96f1e51194f405 (diff)
downloadsamba-0c5214e2eb6249914230f092fe35dfa49da24c34.tar.gz
samba-0c5214e2eb6249914230f092fe35dfa49da24c34.tar.bz2
samba-0c5214e2eb6249914230f092fe35dfa49da24c34.zip
Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/rawfileinfo.c4
1 files changed, 3 insertions, 1 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;
}