From 0150bd394ba73c7fb379294f7a78d710abdcbabf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 31 Jan 2007 20:28:32 +0000 Subject: r21099: Protect ourselves from null pointer deref. This isn't the correct fix for the Vista bug, but it needed as protection against invalid RPC. Thanks to Martin Zielinski for pointing this out. Jeremy. (This used to be commit fbab8e4ba93325f68353ee345a257a5445d78e67) --- source3/rpc_server/srv_spoolss_nt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a655b7054b..3270801fc2 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5988,6 +5988,12 @@ static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, goto done; } + if (!secdesc_ctr) { + DEBUG(10,("update_printer_sec: secdesc_ctr is NULL !\n")); + result = WERR_INVALID_PARAM; + goto done; + } + /* Check the user has permissions to change the security descriptor. By experimentation with two NT machines, the user requires Full Access to the printer to change security -- cgit