mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
python: Handle embedded NUL in stream.send data
Otherwise things like volume upload are only useful with text data.
This commit is contained in:
parent
d6354c1696
commit
6f1bfd6de5
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user