From 87d2722b84992b27b199d362ac4b9034b4697942 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 12 Apr 2011 18:12:20 +1000 Subject: s4/torture Fix calls to charcnv functions to always supply converted_size Signed-off-by: Andrew Tridgell --- source4/torture/rpc/samba3rpc.c | 3 ++- source4/torture/rpc/samlogon.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index d0de30966c..ba21cad0f1 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -2480,6 +2480,7 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree, struct rap_WserverGetInfo r; NTSTATUS status; char servername[17]; + size_t converted_size; r.in.level = 0; r.in.bufsize = 0xffff; @@ -2492,7 +2493,7 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree, memcpy(servername, r.out.info.info0.name, 16); servername[16] = '\0'; - if (!pull_ascii_talloc(mem_ctx, name, servername, NULL)) { + if (!pull_ascii_talloc(mem_ctx, name, servername, &converted_size)) { return NT_STATUS_NO_MEMORY; } diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index 5650d20485..80828e26a2 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -1180,7 +1180,7 @@ static bool test_plaintext(struct samlogon_state *samlogon_state, enum ntlm_brea ZERO_STRUCT(user_session_key); if (!push_ucs2_talloc(samlogon_state->mem_ctx, - &unicodepw, samlogon_state->password, NULL)) { + &unicodepw, samlogon_state->password, &converted_size)) { DEBUG(0, ("push_ucs2_allocate failed!\n")); exit(1); } -- cgit