summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-03-05 09:42:47 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-03-05 09:42:47 +0000
commite121bc11d58aa92f0317667336b746069df01157 (patch)
treee4a8874d5d6dd42b4cb2400c185cf725bed3f8b4 /x11-libs/libXaw3d
parentmarked x86 per bug 403875 (diff)
downloadgentoo-2-e121bc11d58aa92f0317667336b746069df01157.tar.gz
gentoo-2-e121bc11d58aa92f0317667336b746069df01157.tar.bz2
gentoo-2-e121bc11d58aa92f0317667336b746069df01157.zip
Fix use after free in DestroyAllIM (causing segmentation fault in app-text/gv exit) wrt #406487 by Matt Turner
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/libXaw3d')
-rw-r--r--x11-libs/libXaw3d/ChangeLog9
-rw-r--r--x11-libs/libXaw3d/files/libXaw3d-1.6.1-use_after_free.patch39
-rw-r--r--x11-libs/libXaw3d/libXaw3d-1.6.1-r1.ebuild31
3 files changed, 78 insertions, 1 deletions
diff --git a/x11-libs/libXaw3d/ChangeLog b/x11-libs/libXaw3d/ChangeLog
index 7a0a08dce712..8bc147e42ad8 100644
--- a/x11-libs/libXaw3d/ChangeLog
+++ b/x11-libs/libXaw3d/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for x11-libs/libXaw3d
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXaw3d/ChangeLog,v 1.7 2012/02/15 23:53:15 mattst88 Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXaw3d/ChangeLog,v 1.8 2012/03/05 09:42:47 ssuominen Exp $
+
+*libXaw3d-1.6.1-r1 (05 Mar 2012)
+
+ 05 Mar 2012; Samuli Suominen <ssuominen@gentoo.org>
+ +libXaw3d-1.6.1-r1.ebuild, +files/libXaw3d-1.6.1-use_after_free.patch:
+ Fix use after free in DestroyAllIM (causing segmentation fault in app-text/gv
+ exit) wrt #406487 by Matt Turner
*libXaw3d-1.6.1 (15 Feb 2012)
diff --git a/x11-libs/libXaw3d/files/libXaw3d-1.6.1-use_after_free.patch b/x11-libs/libXaw3d/files/libXaw3d-1.6.1-use_after_free.patch
new file mode 100644
index 000000000000..c419462299c0
--- /dev/null
+++ b/x11-libs/libXaw3d/files/libXaw3d-1.6.1-use_after_free.patch
@@ -0,0 +1,39 @@
+From f435c05c64bc20557d901170b76f6bce8506ed48 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 1 Mar 2012 16:48:23 -0500
+Subject: [PATCH libXaw3d] Fix use-after-free in DestroyAllIM
+
+Fixes segmentation fault when closing gv.
+
+Found at http://gitorious.org/xaw3d/xaw3d/commit/23b3ca50395f180cba4a923eb8827dcc961629da
+
+Fixes: https://bugs.gentoo.org/show_bug.cgi?id=406487
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+Original author of this patch is unknown. If you know, let me know and
+I'll fix the attribution.
+
+ src/XawIm.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/XawIm.c b/src/XawIm.c
+index 82a94b1..00562b5 100644
+--- a/src/XawIm.c
++++ b/src/XawIm.c
+@@ -320,12 +320,12 @@ DestroyAllIM(XawVendorShellExtPart *ve)
+ /*
+ * Close Input Method
+ */
+- CloseIM(ve);
+ if (!XFindContext(XDisplayOfIM(ve->im.xim), (Window)ve->im.xim, errContext,
+ (XPointer*)&contextErrData)) {
+ if (contextErrData) XtFree((char *)contextErrData);
+ }
+ XDeleteContext(XDisplayOfIM(ve->im.xim), (Window)ve->im.xim, errContext);
++ CloseIM(ve);
+ ve->im.xim = NULL;
+
+ /*
+--
+1.7.3.4
+
diff --git a/x11-libs/libXaw3d/libXaw3d-1.6.1-r1.ebuild b/x11-libs/libXaw3d/libXaw3d-1.6.1-r1.ebuild
new file mode 100644
index 000000000000..a91aa79bff25
--- /dev/null
+++ b/x11-libs/libXaw3d/libXaw3d-1.6.1-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXaw3d/libXaw3d-1.6.1-r1.ebuild,v 1.1 2012/03/05 09:42:47 ssuominen Exp $
+
+EAPI=4
+inherit xorg-2
+
+DESCRIPTION="X.Org Xaw3d library"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="unicode"
+
+RDEPEND="x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc
+ x11-proto/xextproto
+ x11-proto/xproto"
+
+pkg_setup() {
+ PATCHES=( "${FILESDIR}"/${P}-use_after_free.patch )
+
+ XORG_CONFIGURE_OPTIONS=(
+ $(use_enable unicode internationalization)
+ )
+
+ xorg-2_pkg_setup
+}