Skip to content

Commit

Permalink
x11-toolkits/open-motif*: MenuShell: computing position uses RC_Type(…
Browse files Browse the repository at this point in the history
…) 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/
  • Loading branch information
cschuber committed Dec 5, 2023
1 parent f645ad7 commit 853f1cb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x11-toolkits/open-motif-devel/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PORTNAME= open-motif
PORTVERSION= ${COMMIT_DATE}
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= x11-toolkits
PKGNAMESUFFIX= -devel

Expand Down
10 changes: 10 additions & 0 deletions x11-toolkits/open-motif-devel/files/patch-lib_Xm_MenuShell.c
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion x11-toolkits/open-motif/Makefile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
10 changes: 10 additions & 0 deletions x11-toolkits/open-motif/files/patch-lib_Xm_MenuShell.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 853f1cb

Please sign in to comment.