summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-30 16:11:07 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-30 16:11:07 +1000
commit07e6a0fd8a873be7ce047d01ac775c6e68b7616c (patch)
tree2a1228b40fcc62fbcfb07b065bc4184beb041b69 /source4/lib/messaging
parent21377a7ea9800636a8bc96b3863f97062d7bf9d1 (diff)
downloadsamba-07e6a0fd8a873be7ce047d01ac775c6e68b7616c.tar.gz
samba-07e6a0fd8a873be7ce047d01ac775c6e68b7616c.tar.bz2
samba-07e6a0fd8a873be7ce047d01ac775c6e68b7616c.zip
fixed a segv in the python messaging code on 64 bit systems
(This used to be commit 7598c8389745fcc77da341b4af2dcef6a01db700)
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/pymessaging.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index 1c22fb431a..869508fca6 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -127,12 +127,15 @@ static PyObject *py_messaging_send(PyObject *self, PyObject *args, PyObject *kwa
NTSTATUS status;
struct server_id server;
const char *kwnames[] = { "target", "msg_type", "data", NULL };
+ int length;
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;
}
+ data.length = length;
+
if (!server_id_from_py(target, &server))
return NULL;