From: Douglas Bagnall Date: Tue, 9 Jul 2019 09:45:03 +0000 (+0000) Subject: libcli/pysecurity: use pytalloc_get_name to avoid NULL deref X-Git-Tag: tdb-1.4.2~582 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=99c43354ef5387b708cf0f527f39a86b43c0e979;p=thirdparty%2Fsamba.git libcli/pysecurity: use pytalloc_get_name to avoid NULL deref Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/libcli/security/pysecurity.c b/libcli/security/pysecurity.c index 86b2cc893aa..38d502afb61 100644 --- a/libcli/security/pysecurity.c +++ b/libcli/security/pysecurity.c @@ -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; }