diff options
author | Jeremy Allison <jra@samba.org> | 2011-03-29 11:16:26 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-03-29 21:01:49 +0200 |
commit | 0c5214e2eb6249914230f092fe35dfa49da24c34 (patch) | |
tree | a7e0b1952b1993e1859a6653fc38caf2501e6858 /source4/lib | |
parent | 1e50f9a5c263ed19ef8e9c689c96f1e51194f405 (diff) | |
download | samba-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/lib')
-rw-r--r-- | source4/lib/registry/patchfile_dotreg.c | 3 | ||||
-rw-r--r-- | source4/lib/registry/util.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c index 073c12e345..c4409dcf9c 100644 --- a/source4/lib/registry/patchfile_dotreg.c +++ b/source4/lib/registry/patchfile_dotreg.c @@ -70,6 +70,7 @@ static char *dotreg_data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *b static char *reg_val_dotreg_string(TALLOC_CTX *mem_ctx, uint32_t type, const DATA_BLOB data) { + size_t converted_size = 0; char *ret = NULL; if (data.length == 0) @@ -80,7 +81,7 @@ static char *reg_val_dotreg_string(TALLOC_CTX *mem_ctx, uint32_t type, case REG_SZ: convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX, data.data, data.length, - (void **)&ret, NULL); + (void **)&ret, &converted_size); break; case REG_DWORD: case REG_DWORD_BIG_ENDIAN: diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index 3bbfaf2454..1197adba7f 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -26,6 +26,7 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, uint32_t type, const DATA_BLOB data) { + size_t converted_size = 0; char *ret = NULL; if (data.length == 0) @@ -37,7 +38,7 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, uint32_t type, convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX, data.data, data.length, - (void **)&ret, NULL); + (void **)&ret, &converted_size); break; case REG_DWORD: case REG_DWORD_BIG_ENDIAN: |