[90886] trunk/dports/x11/Xaw3d
jeremyhu at macports.org
jeremyhu at macports.org
Fri Mar 16 23:05:32 PDT 2012
Revision: 90886
https://trac.macports.org/changeset/90886
Author: jeremyhu at macports.org
Date: 2012-03-16 23:05:29 -0700 (Fri, 16 Mar 2012)
Log Message:
-----------
Xaw3d: Pull in some patches from upstream to resolve a gv segfault
Modified Paths:
--------------
trunk/dports/x11/Xaw3d/Portfile
Added Paths:
-----------
trunk/dports/x11/Xaw3d/files/
trunk/dports/x11/Xaw3d/files/0001-Fix-parameters-of-FloatInRange.patch
trunk/dports/x11/Xaw3d/files/0002-Fix-use-after-free-in-DestroyAllIM.patch
Modified: trunk/dports/x11/Xaw3d/Portfile
===================================================================
--- trunk/dports/x11/Xaw3d/Portfile 2012-03-17 01:13:02 UTC (rev 90885)
+++ trunk/dports/x11/Xaw3d/Portfile 2012-03-17 06:05:29 UTC (rev 90886)
@@ -4,6 +4,7 @@
name Xaw3d
version 1.6.1
+revision 1
categories x11 devel
license X11
maintainers jeremyhu openmaintainer
@@ -28,6 +29,11 @@
port:xpm \
port:xorg-libXt
+patch.pre_args -p1
+patchfiles \
+ 0001-Fix-parameters-of-FloatInRange.patch \
+ 0002-Fix-use-after-free-in-DestroyAllIM.patch
+
configure.args \
--enable-internationalization
Added: trunk/dports/x11/Xaw3d/files/0001-Fix-parameters-of-FloatInRange.patch
===================================================================
--- trunk/dports/x11/Xaw3d/files/0001-Fix-parameters-of-FloatInRange.patch (rev 0)
+++ trunk/dports/x11/Xaw3d/files/0001-Fix-parameters-of-FloatInRange.patch 2012-03-17 06:05:29 UTC (rev 90886)
@@ -0,0 +1,29 @@
+From 7fd6427bc3016e9666a587386779952cf8979f09 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88 at gmail.com>
+Date: Wed, 29 Feb 2012 14:26:06 -0500
+Subject: [PATCH 1/2] Fix parameters of FloatInRange
+
+Introduced in f6cd786d1.
+
+Reported-by: Jean-Pierre Demailly <Jean-Pierre.Demailly at ujf-grenoble.fr>
+Signed-off-by: Matt Turner <mattst88 at gmail.com>
+---
+ src/Scrollbar.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git libXaw3d-1.6.1/src/Scrollbar.c libXaw3d-1.6.1/src/Scrollbar.c
+index be74ed3..5667327 100644
+--- libXaw3d-1.6.1/src/Scrollbar.c
++++ libXaw3d-1.6.1/src/Scrollbar.c
+@@ -865,7 +865,7 @@ InRange(int num, int small, int big)
+ */
+
+ static float
+-FloatInRange(int num, int small, int big)
++FloatInRange(float num, float small, float big)
+ {
+ return (num < small) ? small : ((num > big) ? big : num);
+ }
+--
+1.7.9.2
+
Added: trunk/dports/x11/Xaw3d/files/0002-Fix-use-after-free-in-DestroyAllIM.patch
===================================================================
--- trunk/dports/x11/Xaw3d/files/0002-Fix-use-after-free-in-DestroyAllIM.patch (rev 0)
+++ trunk/dports/x11/Xaw3d/files/0002-Fix-use-after-free-in-DestroyAllIM.patch 2012-03-17 06:05:29 UTC (rev 90886)
@@ -0,0 +1,37 @@
+From c3dd42dbd2aaf95d2a1d08a52d9c2e7056ef7ac9 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88 at gmail.com>
+Date: Thu, 1 Mar 2012 16:48:23 -0500
+Subject: [PATCH 2/2] 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
+Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
+Signed-off-by: Matt Turner <mattst88 at gmail.com>
+---
+ src/XawIm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git libXaw3d-1.6.1/src/XawIm.c libXaw3d-1.6.1/src/XawIm.c
+index 82a94b1..00562b5 100644
+--- libXaw3d-1.6.1/src/XawIm.c
++++ libXaw3d-1.6.1/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.9.2
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120316/f454b71f/attachment.html>
More information about the macports-changes
mailing list