diff options
author | Günther Deschner <gd@samba.org> | 2009-03-14 01:38:08 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-17 10:58:28 +0100 |
commit | be9a34e75d03ca09b4d57c57f59f83d4214c7754 (patch) | |
tree | ac50dd0d6615f5a4038e04b1c475a57434379769 /source4/rpc_server | |
parent | c6e3e5eabc6de32117ce7d5403948e9ab739e4eb (diff) | |
download | samba-be9a34e75d03ca09b4d57c57f59f83d4214c7754.tar.gz samba-be9a34e75d03ca09b4d57c57f59f83d4214c7754.tar.bz2 samba-be9a34e75d03ca09b4d57c57f59f83d4214c7754.zip |
s4-spoolss: fix spoolss_GetPrinterData w.r.t. out pointer changes.
Guenther
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/spoolss/dcesrv_spoolss.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c index 61c8009716..820fb7d39e 100644 --- a/source4/rpc_server/spoolss/dcesrv_spoolss.c +++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c @@ -583,6 +583,12 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call, r->out.type = talloc_zero(mem_ctx, enum spoolss_PrinterDataType); 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,7 +600,7 @@ 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.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.data = SPOOLSS_BUFFER_OK(r->out.data, r->out.data); return SPOOLSS_BUFFER_OK(WERR_OK, WERR_MORE_DATA); |