[PATCH] python: Handle embedded NULL in stream.send data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise things like volume upload are only useful with text data.
---
 python/libvirt-override.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/python/libvirt-override.c b/python/libvirt-override.c
index 9d1dac2..70e0238 100644
--- a/python/libvirt-override.c
+++ b/python/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;
     }
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]