From: Douglas Bagnall Date: Tue, 9 Jul 2019 10:51:38 +0000 (+1200) Subject: s3/smbd/py: avoid null deref with bad python arguments X-Git-Tag: tdb-1.4.2~572 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f3b65ff4e5e27e65574a69ee72ac017cd6b3f93c;p=thirdparty%2Fsamba.git s3/smbd/py: avoid null deref with bad python arguments Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index 199885e6801..082c2b44f94 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; } }