summaryrefslogtreecommitdiff
path: root/source4/libnet
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/libnet
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/libnet')
-rw-r--r--source4/libnet/libnet_samdump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/libnet/libnet_samdump.c b/source4/libnet/libnet_samdump.c
index 90ec8d6f42..326d8041b2 100644
--- a/source4/libnet/libnet_samdump.c
+++ b/source4/libnet/libnet_samdump.c
@@ -181,13 +181,14 @@ NTSTATUS libnet_SamDump(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
for (t=samdump_state->trusted_domains; t; t=t->next) {
char *secret_name = talloc_asprintf(mem_ctx, "G$$%s", t->name);
for (s=samdump_state->secrets; s; s=s->next) {
+ size_t converted_size = 0;
char *secret_string;
if (strcasecmp_m(s->name, secret_name) != 0) {
continue;
}
if (!convert_string_talloc_handle(mem_ctx, lpcfg_iconv_handle(ctx->lp_ctx), CH_UTF16, CH_UNIX,
s->secret.data, s->secret.length,
- (void **)&secret_string, NULL)) {
+ (void **)&secret_string, &converted_size)) {
r->out.error_string = talloc_asprintf(mem_ctx,
"Could not convert secret for domain %s to a string",
t->name);