summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-06-20 23:36:10 +0200
committerAndrew Bartlett <abartlet@samba.org>2009-06-29 13:38:59 +1000
commitb08beed0dbc1228b599884ff14eb66ea5f8f732d (patch)
treeed8a1e22a4260594385f56a3fdb5581bc7bc560b /source4/rpc_server
parent8414048557305c62682c7d6c7a42a1f466e48a0a (diff)
downloadsamba-b08beed0dbc1228b599884ff14eb66ea5f8f732d.tar.gz
samba-b08beed0dbc1228b599884ff14eb66ea5f8f732d.tar.bz2
samba-b08beed0dbc1228b599884ff14eb66ea5f8f732d.zip
Small patch for SPOOLSS pipe
Prevents a crash of the SAMBA 4 daemon on the torture SPOOLSS test due to not initialised structures.
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 7d14c0e502..4e8544840c 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -575,11 +575,6 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
WERROR status;
struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
- DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
- handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
- if (!handle)
- return WERR_BADFID;
-
r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
W_ERROR_HAVE_NO_MEMORY(r->out.type);
@@ -589,6 +584,11 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData);
W_ERROR_HAVE_NO_MEMORY(r->out.data);
+ DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
+ handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
+ if (!handle)
+ return WERR_BADFID;
+
switch (handle->type) {
case NTPTR_HANDLE_SERVER:
status = ntptr_GetPrintServerData(handle, mem_ctx, r);