mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
fixed a segv in the python messaging code on 64 bit systems
(This used to be commit 7598c83897
)
This commit is contained in:
@ -127,12 +127,15 @@ static PyObject *py_messaging_send(PyObject *self, PyObject *args, PyObject *kwa
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct server_id server;
|
struct server_id server;
|
||||||
const char *kwnames[] = { "target", "msg_type", "data", NULL };
|
const char *kwnames[] = { "target", "msg_type", "data", NULL };
|
||||||
|
int length;
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Ois#|:send",
|
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Ois#|:send",
|
||||||
discard_const_p(char *, kwnames), &target, &msg_type, &data.data, &data.length)) {
|
discard_const_p(char *, kwnames), &target, &msg_type, &data.data, &length)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data.length = length;
|
||||||
|
|
||||||
if (!server_id_from_py(target, &server))
|
if (!server_id_from_py(target, &server))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user