From: Douglas Bagnall Date: Tue, 9 Jul 2019 10:52:33 +0000 (+1200) Subject: s4/auth/py: avoid null deref with bad python arguments X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=3d33e336267f54e1fe344bf1a83af88092c5ad43;p=npower%2Fsamba.git s4/auth/py: avoid null deref with bad python arguments Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index 8d44b8572c..4203692025 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -76,7 +76,7 @@ static PyObject *py_copy_session_info(PyObject *module, PyErr_Format(PyExc_TypeError, "Expected auth_session_info for session_info " "argument got %s", - talloc_get_name(pytalloc_get_ptr(py_session))); + pytalloc_get_name(py_session)); return NULL; } @@ -258,7 +258,7 @@ static PyObject *py_session_info_fill_unix(PyObject *module, if (!session_info) { PyErr_Format(PyExc_TypeError, "Expected auth_session_info for session_info argument got %s", - talloc_get_name(pytalloc_get_ptr(py_session))); + pytalloc_get_name(py_session)); return NULL; }