summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-31 20:28:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:37 -0500
commit0150bd394ba73c7fb379294f7a78d710abdcbabf (patch)
tree88cc549cbdfa2f05550653db9c156754fb6c022b
parent8162d5ef3a9ff47bf8e55c6608f59bba7f99811b (diff)
downloadsamba-0150bd394ba73c7fb379294f7a78d710abdcbabf.tar.gz
samba-0150bd394ba73c7fb379294f7a78d710abdcbabf.tar.bz2
samba-0150bd394ba73c7fb379294f7a78d710abdcbabf.zip
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 <mz@seh.de> for pointing this out. Jeremy. (This used to be commit fbab8e4ba93325f68353ee345a257a5445d78e67)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c6
1 files changed, 6 insertions, 0 deletions
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