提交 e73ff976 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 3dcafffe
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册