From 6cd2f2ff31768a40ca60112964b35bf040b2e6d8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 26 Jul 2010 19:14:03 +0200 Subject: s3-spoolss: Fixed a possible segfault in winreg_get_printer. --- source3/rpc_server/srv_spoolss_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c index 603a0b2702..768171a277 100644 --- a/source3/rpc_server/srv_spoolss_util.c +++ b/source3/rpc_server/srv_spoolss_util.c @@ -2140,7 +2140,7 @@ WERROR winreg_get_printer(TALLOC_CTX *mem_ctx, } /* Create the printername */ - if (info2->servername[0] != '\0') { + if (info2->servername != NULL && info2->servername[0] != '\0') { if (lp_force_printername(snum)) { const char *p = talloc_asprintf(info2, "%s\\%s", info2->servername, -- cgit