mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
Fix crash passing an empty list to python openAuth() API
If passing a 'credtype' parameter which was an empty list to the python openAuth() API, the 'credtype' field in the virConnectAuth struct would not be initialized. This lead to a crash when later trying to free that field. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
3dcafffe17
commit
e73ff9763a
@ -1820,6 +1820,7 @@ libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
||||
PyObject *pycredtype;
|
||||
virConnectAuth auth;
|
||||
|
||||
memset(&auth, 0, sizeof(auth));
|
||||
if (!PyArg_ParseTuple(args, (char *)"zOi:virConnectOpenAuth", &name, &pyauth, &flags))
|
||||
return NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user