diff options
author | Tim Potter <tpot@samba.org> | 2002-09-25 06:25:02 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-09-25 06:25:02 +0000 |
commit | 7ce782c20c6b9e515a2fa831315ae14c66d322ee (patch) | |
tree | 8f8291bea9de91b83aa6ad1c692f8a1e987dc51f /source | |
parent | cfd1bf250b417f3ba3ad21ff681ab282311bb7eb (diff) | |
download | samba-7ce782c20c6b9e515a2fa831315ae14c66d322ee.tar.gz samba-7ce782c20c6b9e515a2fa831315ae14c66d322ee.tar.xz samba-7ce782c20c6b9e515a2fa831315ae14c66d322ee.zip |
The security descriptor in a PRINTER_INFO_2 could be NULL. (Bong?)
Diffstat (limited to 'source')
-rw-r--r-- | source/python/py_spoolss_printers_conv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/python/py_spoolss_printers_conv.c b/source/python/py_spoolss_printers_conv.c index 760896fcdef..9bef118f2ba 100644 --- a/source/python/py_spoolss_printers_conv.c +++ b/source/python/py_spoolss_printers_conv.c @@ -224,8 +224,12 @@ BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info) *dict = from_struct(info, py_PRINTER_INFO_2); - if (py_from_SECDESC(&obj, info->secdesc)) - PyDict_SetItemString(*dict, "security_descriptor", obj); + /* The security descriptor could be NULL */ + + if (info->secdesc) { + if (py_from_SECDESC(&obj, info->secdesc)) + PyDict_SetItemString(*dict, "security_descriptor", obj); + } /* Bong! The devmode could be NULL */ |