summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c
index 89cdc2dc1f..a0f5a4cfc5 100644
--- a/source3/rpc_server/srv_spoolss_util.c
+++ b/source3/rpc_server/srv_spoolss_util.c
@@ -1773,6 +1773,12 @@ WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
goto done;
}
}
+
+ if (devmode->size != (ndr_size_spoolss_DeviceMode(devmode, 0) - devmode->__driverextra_length)) {
+ result = WERR_INVALID_PARAM;
+ goto done;
+ }
+
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, devmode,
(ndr_push_flags_fn_t) ndr_push_spoolss_DeviceMode);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {