diff options
author | Jeremy Allison <jra@samba.org> | 2007-01-31 20:28:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:37 -0500 |
commit | 0150bd394ba73c7fb379294f7a78d710abdcbabf (patch) | |
tree | 88cc549cbdfa2f05550653db9c156754fb6c022b | |
parent | 8162d5ef3a9ff47bf8e55c6608f59bba7f99811b (diff) | |
download | samba-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.c | 6 |
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 |