summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index ef854b1c08..9df0b8ab32 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -4466,7 +4466,8 @@ static WERROR enum_all_printers_info_1_network(TALLOC_CTX *mem_ctx,
listed. Windows responds to this call with a
WERR_CAN_NOT_COMPLETE so we should do the same. */
- if (servername[0] == '\\' && servername[1] == '\\') {
+ if (servername != NULL &&
+ (servername[0] == '\\') && (servername[1] == '\\')) {
s = servername + 2;
}