aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2023-12-04 23:37:10 +0000
committerCy Schubert <cy@FreeBSD.org>2023-12-05 00:02:04 +0000
commit853f1cb7c8c329402edb90430d709d9dda121efd (patch)
treeee2f264492a175f21b48a72404a7959796e0d7c9
parentf645ad72cc1010b4309722d254836cb43bc01a5d (diff)
x11-toolkits/open-motif*: MenuShell: computing position uses RC_Type() expecting RowColumn
To compute the position of a menu to display, in some cases the position is computed invoking RC_Type() that expects a RowColumn widget. One case was not verifying this hence leading to coredump. Obtained from: https://sourceforge.net/p/motif/code/merge-requests/5/
-rw-r--r--x11-toolkits/open-motif-devel/Makefile2
-rw-r--r--x11-toolkits/open-motif-devel/files/patch-lib_Xm_MenuShell.c10
-rw-r--r--x11-toolkits/open-motif/Makefile2
-rw-r--r--x11-toolkits/open-motif/files/patch-lib_Xm_MenuShell.c10
4 files changed, 22 insertions, 2 deletions
diff --git a/x11-toolkits/open-motif-devel/Makefile b/x11-toolkits/open-motif-devel/Makefile
index 4a9878e10e31..d34714852e78 100644
--- a/x11-toolkits/open-motif-devel/Makefile
+++ b/x11-toolkits/open-motif-devel/Makefile
@@ -1,6 +1,6 @@
PORTNAME= open-motif
PORTVERSION= ${COMMIT_DATE}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= x11-toolkits
PKGNAMESUFFIX= -devel
diff --git a/x11-toolkits/open-motif-devel/files/patch-lib_Xm_MenuShell.c b/x11-toolkits/open-motif-devel/files/patch-lib_Xm_MenuShell.c
new file mode 100644
index 000000000000..af501e746451
--- /dev/null
+++ b/x11-toolkits/open-motif-devel/files/patch-lib_Xm_MenuShell.c
@@ -0,0 +1,10 @@
+--- lib/Xm/MenuShell.c.orig 2023-02-15 16:42:34.000000000 -0800
++++ lib/Xm/MenuShell.c 2023-12-04 15:33:32.718284000 -0800
+@@ -988,6 +988,7 @@
+ if (bottomEdgeOfMenu >= (Position)dispHeight)
+ {
+ if (pulldown_button && XtParent(pulldown_button) &&
++ XmIsRowColumn(XtParent(pulldown_button)) &&
+ (RC_Type(XtParent(pulldown_button)) == XmMENU_BAR))
+ {
+ Position y_temp = *y;
diff --git a/x11-toolkits/open-motif/Makefile b/x11-toolkits/open-motif/Makefile
index 0535b7221a7f..47eb20ebd003 100644
--- a/x11-toolkits/open-motif/Makefile
+++ b/x11-toolkits/open-motif/Makefile
@@ -1,6 +1,6 @@
PORTNAME= open-motif
PORTVERSION= 2.3.8
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= x11-toolkits
# MASTER_SITES= SF/${PORTNAME}/Motif%202.3.4%20Source%20Code/
MASTER_SITES= SF/motif/Motif%20${PORTVERSION}%20Source%20Code/
diff --git a/x11-toolkits/open-motif/files/patch-lib_Xm_MenuShell.c b/x11-toolkits/open-motif/files/patch-lib_Xm_MenuShell.c
new file mode 100644
index 000000000000..af94efe107ae
--- /dev/null
+++ b/x11-toolkits/open-motif/files/patch-lib_Xm_MenuShell.c
@@ -0,0 +1,10 @@
+--- lib/Xm/MenuShell.c.orig 2017-08-16 17:38:43.000000000 -0700
++++ lib/Xm/MenuShell.c 2023-12-04 15:33:35.350531000 -0800
+@@ -988,6 +988,7 @@
+ if (bottomEdgeOfMenu >= (Position)dispHeight)
+ {
+ if (pulldown_button && XtParent(pulldown_button) &&
++ XmIsRowColumn(XtParent(pulldown_button)) &&
+ (RC_Type(XtParent(pulldown_button)) == XmMENU_BAR))
+ {
+ Position y_temp = *y;