2655f4b74c
* Tue Apr 2 2013 David Malcolm <dmalcolm@redhat.com> - 3.8.0-2 - add workarounds for ppc64 (rhbz#924425)
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From c1fb6516031d3c32abd640f09a4814ae4363f979 Mon Sep 17 00:00:00 2001
|
|
From: Simon Feltman <sfeltman@src.gnome.org>
|
|
Date: Sun, 31 Mar 2013 08:32:34 +0000
|
|
Subject: Fix stack corruption due to incorrect format for argument parser
|
|
|
|
Fix call to PyArg_ParseTupleAndKeywords that used a format parser
|
|
of "l" meaning long (8 bytes) in combination with an output pointer
|
|
of guint (4 bytes). Change to use gulong with a format of "k".
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=696892
|
|
---
|
|
diff --git a/gi/_gobject/pygflags.c b/gi/_gobject/pygflags.c
|
|
index 83aa4dc..bdeaae7 100644
|
|
--- a/gi/_gobject/pygflags.c
|
|
+++ b/gi/_gobject/pygflags.c
|
|
@@ -129,12 +129,12 @@ static PyObject *
|
|
pyg_flags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|
{
|
|
static char *kwlist[] = { "value", NULL };
|
|
- guint value;
|
|
+ gulong value;
|
|
PyObject *pytc, *values, *ret, *pyint;
|
|
GType gtype;
|
|
GFlagsClass *eclass;
|
|
|
|
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "l", kwlist, &value))
|
|
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "k", kwlist, &value))
|
|
return NULL;
|
|
|
|
pytc = PyObject_GetAttrString((PyObject *)type, "__gtype__");
|
|
--
|
|
cgit v0.9.1
|