summaryrefslogtreecommitdiff
path: root/source4/rpc_server/spoolss/dcesrv_spoolss.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/spoolss/dcesrv_spoolss.c')
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 61c8009716..7d14c0e502 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -580,9 +580,15 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
if (!handle)
return WERR_BADFID;
- r->out.type = talloc_zero(mem_ctx, enum spoolss_PrinterDataType);
+ r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
W_ERROR_HAVE_NO_MEMORY(r->out.type);
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ W_ERROR_HAVE_NO_MEMORY(r->out.needed);
+
+ r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData);
+ W_ERROR_HAVE_NO_MEMORY(r->out.data);
+
switch (handle->type) {
case NTPTR_HANDLE_SERVER:
status = ntptr_GetPrintServerData(handle, mem_ctx, r);
@@ -594,8 +600,8 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = ndr_size_spoolss_PrinterData(&r->out.data, *r->out.type, ic, 0);
- *r->out.type = SPOOLSS_BUFFER_OK(*r->out.type, SPOOLSS_PRINTER_DATA_TYPE_NULL);
+ *r->out.needed = ndr_size_spoolss_PrinterData(r->out.data, *r->out.type, ic, 0);
+ *r->out.type = SPOOLSS_BUFFER_OK(*r->out.type, REG_NONE);
r->out.data = SPOOLSS_BUFFER_OK(r->out.data, r->out.data);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_MORE_DATA);
}