summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2013-03-31 13:36:22 +0000
committerPacho Ramos <pacho@gentoo.org>2013-03-31 13:36:22 +0000
commit3faee0bb2b3eabe5018d91bf5044801796ec39af (patch)
tree23823615d61875a84cc53b6bd544abf442532e38 /dev-python/pygobject/files
parentApply two upstream patches fixing a crash and a build failure (#463940 by Tor... (diff)
downloadhistorical-3faee0bb2b3eabe5018d91bf5044801796ec39af.tar.gz
historical-3faee0bb2b3eabe5018d91bf5044801796ec39af.tar.bz2
historical-3faee0bb2b3eabe5018d91bf5044801796ec39af.zip
Fix stack corruption due to incorrect format for argument parser (#463700 by Alphat-PC)
Package-Manager: portage-2.1.11.58/cvs/Linux x86_64 Manifest-Sign-Key: 0xA188FBD4
Diffstat (limited to 'dev-python/pygobject/files')
-rw-r--r--dev-python/pygobject/files/pygobject-3.8.0-stack-corruption.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/pygobject/files/pygobject-3.8.0-stack-corruption.patch b/dev-python/pygobject/files/pygobject-3.8.0-stack-corruption.patch
new file mode 100644
index 000000000000..046ca4ff9806
--- /dev/null
+++ b/dev-python/pygobject/files/pygobject-3.8.0-stack-corruption.patch
@@ -0,0 +1,32 @@
+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