From 10abfb3f87cdbae204a5b49160ef8cbd9e56c090 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 15 Jan 2003 05:55:22 +0000 Subject: 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) --- source3/printing/nt_printing.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3/printing/nt_printing.c') 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)); -- cgit