summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-26 19:14:03 +0200
committerSimo Sorce <idra@samba.org>2010-07-27 10:27:16 -0400
commit6cd2f2ff31768a40ca60112964b35bf040b2e6d8 (patch)
tree2e020f015f44c0dbd44d3df4eeef50aa4986e792
parentbb0226f10ef86296af273ea0e9692b72d0ead4c2 (diff)
downloadsamba-6cd2f2ff31768a40ca60112964b35bf040b2e6d8.tar.gz
samba-6cd2f2ff31768a40ca60112964b35bf040b2e6d8.tar.bz2
samba-6cd2f2ff31768a40ca60112964b35bf040b2e6d8.zip
s3-spoolss: Fixed a possible segfault in winreg_get_printer.
-rw-r--r--source3/rpc_server/srv_spoolss_util.c2
1 files changed, 1 insertions, 1 deletions
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,