s3-spoolss: Avoid segfault, check drivername is actually not NULL.
authorSimo Sorce <idra@samba.org>
Mon, 26 Jul 2010 22:28:15 +0000 (18:28 -0400)
committerSimo Sorce <idra@samba.org>
Tue, 27 Jul 2010 14:27:16 +0000 (10:27 -0400)
source3/rpc_server/srv_spoolss_nt.c

index d781e2c95095f64c018b8b0794057a86272f385b..5840283eabd0d88fb11ac563b606331bb4de229d 100644 (file)
@@ -1342,6 +1342,10 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
                        continue;
                }
 
+               if (!pinfo2->drivername) {
+                       continue;
+               }
+
                if (strcmp(drivername, pinfo2->drivername) != 0) {
                        continue;
                }