From c97fe37ea3d92a631e8da17c21dafae1db15e97b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 21 Sep 2007 14:37:35 +0000 Subject: r25294: Tidy up callers of unistr2_to_ascii() to pass sizeof(target_area) to the maxeln parameter instead of sizeof(target_area) - 1 (or even sizeof(fstring) - 1 in some places. I hope these were really all there were. Michael (This used to be commit 9a28be220df622322857dfe102fa35e108f932dc) --- source3/rpc_client/cli_samr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/rpc_client') diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 7a210f0d3a..b1b6623bcd 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -683,7 +683,7 @@ NTSTATUS rpccli_samr_enum_dom_users(struct rpc_pipe_client *cli, TALLOC_CTX *mem fstring conv_buf; (*rids)[i] = r.sam[i].rid; - unistr2_to_ascii(conv_buf, &(r.uni_acct_name[i]), sizeof(conv_buf) - 1); + unistr2_to_ascii(conv_buf, &(r.uni_acct_name[i]), sizeof(conv_buf)); (*dom_users)[i] = talloc_strdup(mem_ctx, conv_buf); } } @@ -751,7 +751,7 @@ NTSTATUS rpccli_samr_enum_dom_groups(struct rpc_pipe_client *cli, if (r.sam[i].hdr_name.buffer) { unistr2_to_ascii((*dom_groups)[i].acct_name, &r.uni_grp_name[name_idx], - sizeof(fstring) - 1); + sizeof((*dom_groups)[i].acct_name)); name_idx++; } @@ -822,7 +822,7 @@ NTSTATUS rpccli_samr_enum_als_groups(struct rpc_pipe_client *cli, if (r.sam[i].hdr_name.buffer) { unistr2_to_ascii((*dom_aliases)[i].acct_name, &r.uni_grp_name[name_idx], - sizeof(fstring) - 1); + sizeof((*dom_aliases)[i].acct_name)); name_idx++; } @@ -1699,7 +1699,7 @@ NTSTATUS rpccli_samr_lookup_rids(struct rpc_pipe_client *cli, for (i = 0; i < r.num_names1; i++) { fstring tmp; - unistr2_to_ascii(tmp, &r.uni_name[i], sizeof(tmp) - 1); + unistr2_to_ascii(tmp, &r.uni_name[i], sizeof(tmp)); (*names)[i] = talloc_strdup(mem_ctx, tmp); (*name_types)[i] = r.type[i]; } -- cgit