From 0c5214e2eb6249914230f092fe35dfa49da24c34 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 29 Mar 2011 11:16:26 -0700 Subject: Ensure convert_string_XXX is always called with a valid converted_size pointer. Preparation for cleaning up this API. Autobuild-User: Jeremy Allison Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104 --- source4/libcli/raw/rawfileinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/libcli/raw') 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; } -- cgit