From f3b65ff4e5e27e65574a69ee72ac017cd6b3f93c Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Tue, 9 Jul 2019 22:51:38 +1200 Subject: [PATCH] s3/smbd/py: avoid null deref with bad python arguments Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- source3/smbd/pysmbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index 199885e680..082c2b44f9 100644 --- a/source3/smbd/pysmbd.c +++ b/source3/smbd/pysmbd.c @@ -595,7 +595,7 @@ static PyObject *py_smbd_set_nt_acl(PyObject *self, PyObject *args, PyObject *kw 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; } } @@ -663,7 +663,7 @@ static PyObject *py_smbd_get_nt_acl(PyObject *self, PyObject *args, PyObject *kw 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; } } -- 2.34.1