summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-15 05:55:22 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-15 05:55:22 +0000
commit10abfb3f87cdbae204a5b49160ef8cbd9e56c090 (patch)
tree8e812ae1839fc6c45f2d546207d6079dd3b6a4aa /source3
parentec894b56953a48a3591f3a127c7459f95c9935e3 (diff)
downloadsamba-10abfb3f87cdbae204a5b49160ef8cbd9e56c090.tar.gz
samba-10abfb3f87cdbae204a5b49160ef8cbd9e56c090.tar.bz2
samba-10abfb3f87cdbae204a5b49160ef8cbd9e56c090.zip
Crash fixes:
- fix a crash when a second NTLMSSP session tried to free the first - fix a crash due to some NULL pointers in the Add Printer Wizard (or read printer code too it appears). As far as I can tell it's just that the GUID just might not exist. Andrew Bartlett (This used to be commit 51b1413056b0d001076ff47a755eb35baa2d9e6d)
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_ntlmssp.c1
-rw-r--r--source3/printing/nt_printing.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index f5e5c987ba..f165322f7a 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -58,6 +58,7 @@ NTSTATUS ntlmssp_server_end(NTLMSSP_STATE **ntlmssp_state)
}
talloc_destroy(mem_ctx);
+ *ntlmssp_state = NULL;
return NT_STATUS_OK;
}
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 72e3d38bb3..73f1dd5f0d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2738,9 +2738,14 @@ BOOL is_printer_published(int snum, GUID *guid)
SPOOL_DSSPOOLER_KEY)) < 0)
return False;
- ctr = &printer->info_2->data.keys[i].values;
+ if (!(ctr = &printer->info_2->data.keys[i].values)) {
+ return False;
+ }
+
+ if (!(guid_val = regval_ctr_getvalue(ctr, "objectGUID"))) {
+ return False;
+ }
- guid_val = regval_ctr_getvalue(ctr, "objectGUID");
if (regval_size(guid_val) == sizeof(GUID))
memcpy(guid, regval_data_p(guid_val), sizeof(GUID));