mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
librpc/py_security: Don’t pass a NULL pointer to PyUnicode_FromString()
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
64834e2668
commit
b25a6b12a9
@ -310,6 +310,10 @@ static PyObject *py_descriptor_as_sddl(PyObject *self, PyObject *args)
|
||||
sid = NULL;
|
||||
|
||||
text = sddl_encode(NULL, desc, sid);
|
||||
if (text == NULL) {
|
||||
PyErr_SetString(PyExc_ValueError, "Unable to encode SDDL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret = PyUnicode_FromString(text);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user