aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-09-10 16:00:05 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-09-11 12:16:17 +0100
commite73ff9763a6efde95037f33b4f7a5eb1ef029c35 (patch)
treed027ac38037103c332cb9e6cc1f6064e90a0400a /python
parentvirsh: Fix the typos (diff)
downloadlibvirt-e73ff9763a6efde95037f33b4f7a5eb1ef029c35.tar.gz
libvirt-e73ff9763a6efde95037f33b4f7a5eb1ef029c35.tar.bz2
libvirt-e73ff9763a6efde95037f33b4f7a5eb1ef029c35.zip
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>
Diffstat (limited to 'python')
-rw-r--r--python/libvirt-override.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/libvirt-override.c b/python/libvirt-override.c
index 75bacff97..c51dd3fac 100644
--- a/python/libvirt-override.c
+++ b/python/libvirt-override.c
@@ -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;