r25281: Fix a caller of unistr2_to_ascii():
authorMichael Adam <obnox@samba.org>
Fri, 21 Sep 2007 10:46:09 +0000 (10:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:57 +0000 (12:30 -0500)
The maxlen parameter should be set to the size of the
destination, not to the size of the soruce.

Michael

source/rpcclient/cmd_lsarpc.c

index 3f4117ffbe53fe29e45dc871eaeb23d80d48db8d..c405787f1d2129377e64afc766dab610e54b4080 100644 (file)
@@ -86,7 +86,7 @@ static void display_query_info_3(DOM_QUERY_3 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));