From e73ff9763a6efde95037f33b4f7a5eb1ef029c35 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 10 Sep 2012 16:00:05 +0100 Subject: [PATCH] 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 --- python/libvirt-override.c | 1 + 1 file changed, 1 insertion(+) diff --git a/python/libvirt-override.c b/python/libvirt-override.c index 75bacff976..c51dd3fac9 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;