diff options
author | Cole Robinson <crobinso@redhat.com> | 2011-07-25 11:44:36 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2011-07-25 17:28:11 -0400 |
commit | 6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c (patch) | |
tree | 303b74a2457fc018ac956e683ecf774a612a5961 | |
parent | 0fad55b22fe336b075ce14f42012decf9ea8df3b (diff) | |
download | libvirt-python-split-6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c.tar.gz libvirt-python-split-6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c.tar.xz libvirt-python-split-6a8c4e100eda5c11b8d3183ff4b5c6873eb58d0c.zip |
python: Handle embedded NUL in stream.send datav0.9.4-rc1
Otherwise things like volume upload are only useful with text data.
-rw-r--r-- | libvirt-override.c | 5 |
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; } |