summaryrefslogtreecommitdiff
path: root/source3/lsarpcd/srv_lsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lsarpcd/srv_lsa.c')
-rw-r--r--source3/lsarpcd/srv_lsa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lsarpcd/srv_lsa.c b/source3/lsarpcd/srv_lsa.c
index 7bc5841cfc..b1761219af 100644
--- a/source3/lsarpcd/srv_lsa.c
+++ b/source3/lsarpcd/srv_lsa.c
@@ -88,14 +88,15 @@ static void make_dom_query(DOM_QUERY *d_q, char *dom_name, DOM_SID *dom_sid)
fstring sid_str;
int domlen = strlen(dom_name);
+ d_q->uni_dom_str_len = (domlen+1) * 2;
d_q->uni_dom_max_len = domlen * 2;
- d_q->uni_dom_str_len = domlen * 2;
d_q->buffer_dom_name = domlen != 0 ? 1 : 0; /* domain buffer pointer */
d_q->buffer_dom_sid = dom_sid != NULL ? 1 : 0; /* domain sid pointer */
/* this string is supposed to be character short */
make_unistr2(&(d_q->uni_domain_name), dom_name, domlen);
+ d_q->uni_domain_name.uni_max_len++;
sid_to_string(sid_str, dom_sid);
make_dom_sid2(&(d_q->dom_sid), dom_sid);