diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 157a4e2bd3..0cf1e13328 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -7768,7 +7768,7 @@ WERROR _spoolss_EnumPrinterData(pipes_struct *p, if (!r->out.value_name) { return WERR_NOMEM; } - *r->out.value_needed = strlen_m(val->value_name); + *r->out.value_needed = val->value_name_len; } else { r->out.value_name = NULL; *r->out.value_needed = 0; @@ -7785,9 +7785,9 @@ WERROR _spoolss_EnumPrinterData(pipes_struct *p, * in MS-RPRN. */ - if (r->out.data && val->data && + if (r->out.data && val->data && val->data->data && val->data_length && r->in.data_offered) { - memcpy(r->out.data, val->data, + memcpy(r->out.data, val->data->data, MIN(val->data_length,r->in.data_offered)); } @@ -9072,6 +9072,8 @@ static WERROR registry_value_to_printer_enum_value(TALLOC_CTX *mem_ctx, r->value_name = talloc_strdup(mem_ctx, regval_name(v)); W_ERROR_HAVE_NO_MEMORY(r->value_name); + r->value_name_len = strlen_m_term(regval_name(v)) * 2; + r->type = regval_type(v); r->data_length = regval_size(v); |