summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index b4f1bec15e..6d756bdf36 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -8799,7 +8799,7 @@ done:
WERROR _spoolss_SetForm(struct pipes_struct *p,
struct spoolss_SetForm *r)
{
- struct spoolss_AddFormInfo1 *form = r->in.info.info1;
+ struct spoolss_AddFormInfo1 *form;
const char *form_name = r->in.form_name;
int snum = -1;
WERROR status = WERR_OK;
@@ -8826,6 +8826,15 @@ WERROR _spoolss_SetForm(struct pipes_struct *p,
return WERR_ACCESS_DENIED;
}
+ if (r->in.info_ctr->level != 1) {
+ return WERR_INVALID_LEVEL;
+ }
+
+ form = r->in.info_ctr->info.info1;
+ if (!form) {
+ return WERR_INVALID_PARAM;
+ }
+
tmp_ctx = talloc_new(p->mem_ctx);
if (!tmp_ctx) {
return WERR_NOMEM;