1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-05 12:22:11 +03:00

libcli/pysecurity: use pytalloc_get_name to avoid NULL deref

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall
2019-07-09 09:45:03 +00:00
committed by Andrew Bartlett
parent cd20e3876c
commit 99c43354ef

View File

@ -48,7 +48,7 @@ static PyObject *py_se_access_check(PyObject *module, PyObject *args, PyObject *
if (!security_descriptor) {
PyErr_Format(PyExc_TypeError,
"Expected dcerpc.security.descriptor for security_descriptor argument got %s",
talloc_get_name(pytalloc_get_ptr(py_sec_desc)));
pytalloc_get_name(py_sec_desc));
return NULL;
}
@ -56,7 +56,7 @@ static PyObject *py_se_access_check(PyObject *module, PyObject *args, PyObject *
if (!security_token) {
PyErr_Format(PyExc_TypeError,
"Expected dcerpc.security.token for token argument, got %s",
talloc_get_name(pytalloc_get_ptr(py_security_token)));
pytalloc_get_name(py_sec_desc));
return NULL;
}