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/libnet/libnet_samdump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/libnet') 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); -- cgit