s4/torture Fix calls to charcnv functions to always supply converted_size
authorAndrew Bartlett <abartlet@samba.org>
Tue, 12 Apr 2011 08:12:20 +0000 (18:12 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 Apr 2011 04:47:07 +0000 (14:47 +1000)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/torture/rpc/samba3rpc.c
source4/torture/rpc/samlogon.c

index d0de30966c2af63fa32ea65a2f2543decce35264..ba21cad0f1ce9bf741bd2790ba1ea1ce7e5adfcf 100644 (file)
@@ -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;
        }
 
index 5650d2048566cb7f0824fc5ae8247973ff5cf2f2..80828e26a2a2141bf5f0c7823621ea3eaeece614 100644 (file)
@@ -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);
        }