diff options
Diffstat (limited to 'source3/rpc_parse/parse_reg.c')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index ce0b7fff87..abb00e1572 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -161,10 +161,10 @@ void make_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd, memcpy(&(q_c->pnt_pol), hnd, sizeof(q_c->pnt_pol)); - make_uni_hdr(&(q_c->hdr_name), len_name, len_name, 1); + make_uni_hdr(&(q_c->hdr_name), len_name); make_unistr2(&(q_c->uni_name), name, len_name); - make_uni_hdr(&(q_c->hdr_class), len_class, len_class, 1); + make_uni_hdr(&(q_c->hdr_class), len_class); make_unistr2(&(q_c->uni_class), class, len_class); q_c->reserved = 0x00000000; @@ -249,7 +249,7 @@ void make_reg_q_delete_val(REG_Q_DELETE_VALUE *q_c, POLICY_HND *hnd, memcpy(&(q_c->pnt_pol), hnd, sizeof(q_c->pnt_pol)); - make_uni_hdr(&(q_c->hdr_name), len_name, len_name, 1); + make_uni_hdr(&(q_c->hdr_name), len_name); make_unistr2(&(q_c->uni_name), name, len_name); } @@ -300,7 +300,7 @@ void make_reg_q_delete_key(REG_Q_DELETE_KEY *q_c, POLICY_HND *hnd, memcpy(&(q_c->pnt_pol), hnd, sizeof(q_c->pnt_pol)); - make_uni_hdr(&(q_c->hdr_name), len_name, len_name, 1); + make_uni_hdr(&(q_c->hdr_name), len_name); make_unistr2(&(q_c->uni_name), name, len_name); } @@ -349,7 +349,9 @@ void make_reg_q_query_key(REG_Q_QUERY_KEY *q_o, POLICY_HND *hnd, ZERO_STRUCTP(q_o); memcpy(&(q_o->pol), hnd, sizeof(q_o->pol)); - make_uni_hdr(&q_o->hdr_class, max_class_len, 0, max_class_len > 0 ? 1 : 0); + q_o->hdr_class.uni_str_len = 0; + q_o->hdr_class.uni_max_len = max_class_len * 2; + q_o->hdr_class.buffer = max_class_len > 0 ? 1 : 0; q_o->uni_class.uni_max_len = max_class_len; } @@ -690,7 +692,7 @@ void make_reg_q_info(REG_Q_INFO *q_i, POLICY_HND *pol, char *product_type, memcpy(&(q_i->pol), pol, sizeof(q_i->pol)); - make_uni_hdr(&(q_i->hdr_type), len_type, len_type, 1); + make_uni_hdr(&(q_i->hdr_type), len_type); make_unistr2(&(q_i->uni_type), product_type, len_type); q_i->ptr1 = 1; @@ -836,7 +838,9 @@ void make_reg_q_enum_val(REG_Q_ENUM_VALUE *q_i, POLICY_HND *pol, memcpy(&(q_i->pol), pol, sizeof(q_i->pol)); q_i->val_index = val_idx; - make_uni_hdr(&q_i->hdr_name, max_val_len, 0, 1); + q_i->hdr_name.uni_str_len = 0; + q_i->hdr_name.uni_max_len = max_val_len * 2; + q_i->hdr_name.buffer = max_val_len > 0 ? 1 : 0; q_i->uni_name.uni_max_len = max_val_len; q_i->ptr_type = 1; @@ -951,7 +955,7 @@ void make_reg_q_create_val(REG_Q_CREATE_VALUE *q_i, POLICY_HND *pol, memcpy(&(q_i->pol), pol, sizeof(q_i->pol)); - make_uni_hdr(&q_i->hdr_name, val_len, val_len, 1); + make_uni_hdr(&q_i->hdr_name, val_len); make_unistr2(&(q_i->uni_name), val_name, val_len); q_i->type = type; @@ -1116,7 +1120,7 @@ void make_reg_q_open_entry(REG_Q_OPEN_ENTRY *r_q, POLICY_HND *pol, memcpy(&(r_q->pol), pol, sizeof(r_q->pol)); - make_uni_hdr(&(r_q->hdr_name), len_name, len_name, 1); + make_uni_hdr(&(r_q->hdr_name), len_name); make_unistr2(&(r_q->uni_name), key_name, len_name); r_q->unknown_0 = 0x00000000; @@ -1191,7 +1195,7 @@ void make_reg_q_shutdown(REG_Q_SHUTDOWN *q_i, q_i->ptr_1 = 1; q_i->ptr_2 = 1; - make_uni_hdr(&q_i->hdr_msg, len, len, 1); + make_uni_hdr(&q_i->hdr_msg, len); make_unistr2(&(q_i->uni_msg), msg, len); q_i->timeout = timeout; |