diff options
author | Matthew Chapman <matty@samba.org> | 1999-02-15 05:33:30 +0000 |
---|---|---|
committer | Matthew Chapman <matty@samba.org> | 1999-02-15 05:33:30 +0000 |
commit | 2737f26ad64ee32d6ef7365dcce0a3eb881f99db (patch) | |
tree | 52dce623844dbea155cb961ad50f1edf83d8a1df /source3/rpc_client/cli_lsarpc.c | |
parent | 0baa42bdd751b81ca6d17d1b5377a4e345936cad (diff) | |
download | samba-2737f26ad64ee32d6ef7365dcce0a3eb881f99db.tar.gz samba-2737f26ad64ee32d6ef7365dcce0a3eb881f99db.tar.bz2 samba-2737f26ad64ee32d6ef7365dcce0a3eb881f99db.zip |
Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
(This used to be commit ce24191939b82985d09eabe945199f38b0fea486)
Diffstat (limited to 'source3/rpc_client/cli_lsarpc.c')
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 21eba6ddb7..751a84aaaa 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -331,8 +331,8 @@ BOOL lsa_lookup_sids(struct cli_state *cli, uint16 fnum, if (dom_idx != 0xffffffff) { - unistr2_to_ascii(dom_name, &ref.ref_dom[dom_idx].uni_dom_name, sizeof(dom_name)); - unistr2_to_ascii(name, &t_names.uni_name[i], sizeof(name)); + unistr2_to_ascii(dom_name, &ref.ref_dom[dom_idx].uni_dom_name, sizeof(dom_name)-1); + unistr2_to_ascii(name, &t_names.uni_name[i], sizeof(name)-1); memset(full_name, 0, sizeof(full_name)); @@ -427,7 +427,7 @@ BOOL lsa_query_info_pol(struct cli_state *cli, uint16 fnum, { if (r_q.dom.id3.buffer_dom_name != 0) { - unistr2_to_ascii(domain_name, &r_q.dom.id3.uni_domain_name, sizeof(domain_name)); + unistr2_to_ascii(domain_name, &r_q.dom.id3.uni_domain_name, sizeof(fstring)-1); } if (r_q.dom.id3.buffer_dom_sid != 0) { @@ -441,7 +441,7 @@ BOOL lsa_query_info_pol(struct cli_state *cli, uint16 fnum, { if (r_q.dom.id5.buffer_dom_name != 0) { - unistr2_to_ascii(domain_name, &r_q.dom.id5.uni_domain_name, sizeof(domain_name)); + unistr2_to_ascii(domain_name, &r_q.dom.id5.uni_domain_name, sizeof(fstring)-1); } if (r_q.dom.id5.buffer_dom_sid != 0) { |