s3/libsmb/py: avoid null deref with bad python arguments
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 9 Jul 2019 10:51:18 +0000 (22:51 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 22 Jul 2019 22:20:26 +0000 (22:20 +0000)
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>
source3/libsmb/pylibsmb.c

index aac0d95ba07261dc36b3d2d119b7e61018eb684a..c09df91725118bd7fb49d08793562be0cfdefb70 100644 (file)
@@ -1558,7 +1558,7 @@ static PyObject *py_smb_setacl(struct py_cli_state *self, PyObject *args)
        if (!sd) {
                PyErr_Format(PyExc_TypeError,
                        "Expected dcerpc.security.descriptor as argument, got %s",
-                       talloc_get_name(pytalloc_get_ptr(py_sd)));
+                       pytalloc_get_name(py_sd));
                return NULL;
        }