r21099: Protect ourselves from null pointer deref. This isn't
authorJeremy Allison <jra@samba.org>
Wed, 31 Jan 2007 20:28:32 +0000 (20:28 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:37 +0000 (12:17 -0500)
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)

source3/rpc_server/srv_spoolss_nt.c

index a655b7054b15ce4c24fd525e4fd0caf2ec8f8034..3270801fc2a9b1a322a1e9f87db4d86c7ab7d65c 100644 (file)
@@ -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