summaryrefslogtreecommitdiffstats
path: root/libvirt-override.c
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2011-07-25 11:44:36 -0400
committerCole Robinson <crobinso@redhat.com>2011-07-25 17:28:11 -0400
commit6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c (patch)
tree303b74a2457fc018ac956e683ecf774a612a5961 /libvirt-override.c
parent0fad55b22fe336b075ce14f42012decf9ea8df3b (diff)
downloadlibvirt-python-v6-6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c.tar.gz
libvirt-python-v6-6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c.tar.xz
libvirt-python-v6-6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c.zip
python: Handle embedded NUL in stream.send datav0.9.4-rc1
Otherwise things like volume upload are only useful with text data.
Diffstat (limited to 'libvirt-override.c')
-rw-r--r--libvirt-override.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index 9d1dac2..70e0238 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -4151,11 +4151,12 @@ libvirt_virStreamSend(PyObject *self ATTRIBUTE_UNUSED,
PyObject *pyobj_stream;
virStreamPtr stream;
char *data;
+ int datalen;
int ret;
int nbytes;
- if (!PyArg_ParseTuple(args, (char *) "Ozi:virStreamRecv",
- &pyobj_stream, &data, &nbytes)) {
+ if (!PyArg_ParseTuple(args, (char *) "Oz#i:virStreamRecv",
+ &pyobj_stream, &data, &datalen, &nbytes)) {
DEBUG("%s failed to parse tuple\n", __FUNCTION__);
return VIR_PY_INT_FAIL;
}