r25285: Fix some more callers of unistr2_to_ascii to use the size of
authorMichael Adam <obnox@samba.org>
Fri, 21 Sep 2007 11:53:14 +0000 (11:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:57 +0000 (12:30 -0500)
destination instead of source as maxlen.

Michael

source/rpcclient/cmd_lsarpc.c

index c405787f1d2129377e64afc766dab610e54b4080..31a8e2bdfd130ba1d4682eb3c0fd30c963baef08 100644 (file)
@@ -96,7 +96,7 @@ static void display_query_info_5(DOM_QUERY_5 d)
 {
        fstring name;
 
-       unistr2_to_ascii(name, &d.uni_domain_name, d.uni_dom_max_len);
+       unistr2_to_ascii(name, &d.uni_domain_name, sizeof(name));
 
        d_printf("Domain Name: %s\n", name);
        d_printf("Domain Sid: %s\n", sid_string_static(&d.dom_sid.sid));
@@ -118,9 +118,9 @@ static void display_query_info_12(DOM_QUERY_12 d)
 {
        fstring dom_name, dns_dom_name, forest_name;
 
-       unistr2_to_ascii(dom_name, &d.uni_nb_dom_name, d.hdr_nb_dom_name.uni_max_len);
-       unistr2_to_ascii(dns_dom_name, &d.uni_dns_dom_name, d.hdr_dns_dom_name.uni_max_len);
-       unistr2_to_ascii(forest_name, &d.uni_forest_name, d.hdr_forest_name.uni_max_len);
+       unistr2_to_ascii(dom_name, &d.uni_nb_dom_name, sizeof(dom_name));
+       unistr2_to_ascii(dns_dom_name, &d.uni_dns_dom_name, sizeof(dns_dom_name));
+       unistr2_to_ascii(forest_name, &d.uni_forest_name, sizeof(forest_name));
 
        d_printf("Domain NetBios Name: %s\n", dom_name);
        d_printf("Domain DNS Name: %s\n", dns_dom_name);