diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-05-08 15:42:03 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-05-09 17:02:11 +0100 |
commit | c1075880bab95deb32046dfe988813b1ea536065 (patch) | |
tree | ae6e8e30c704d58547e6d20f83e14c62cd108129 /libvirt-override.c | |
parent | 71b7f59c5b9528449630e40ca947dd71ac51e4dc (diff) | |
download | libvirt-python-c1075880bab95deb32046dfe988813b1ea536065.tar.gz |
Fix build of python bindings on Python 2.4CVE-2013-1962
The PyDict_Next method on Python <= 2.4 used 'int' instead
of "Py_ssize_t" for the 'pos' parameter
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'libvirt-override.c')
-rw-r--r-- | libvirt-override.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libvirt-override.c b/libvirt-override.c index 856789a..fd9ebb8 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -152,7 +152,11 @@ setPyVirTypedParameter(PyObject *info, const virTypedParameterPtr params, int nparams) { PyObject *key, *value; +#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 4 + int pos = 0; +#else Py_ssize_t pos = 0; +#endif virTypedParameterPtr temp = NULL, ret = NULL; Py_ssize_t size; int i; |