1
0
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:
Joseph Sutton 2023-07-20 12:22:45 +12:00 committed by Andrew Bartlett
parent 64834e2668
commit b25a6b12a9

View File

@ -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);