pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/57754: Motif bug in MenuShell



>Number:         57754
>Category:       pkg
>Synopsis:       Motif bug in MenuShell
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 05 17:05:00 +0000 2023
>Originator:     Thierry LARONDE
>Release:        pkgsrc-2023Q3
>Organization:
>Environment:
NetBSD cauchy.polynum.local 10.99.10 NetBSD 10.99.10 (CAUCHY) #2: Mon Dec  4 21:26:18 CET 2023  tlaronde@cauchy.polynum.local:/data/m/netbsd-10.99/sys/arch/amd64/compile/CAUCHY amd64

>Description:
When requesting a pulldown menu and the cursor is at the bottom of the window and there is no space left in the root window, the application crashes.

This is due in the code of the lack of testing that the parent is of XmRowColumn class. Patch attached.

There is not anymore a way to send a bug report (and a fix). I have requested a pull-up with the commit from a fork but it is unlikely that it will be apply (there are other pull-up requested waiting there for years to be treated by "someone"(TM)).
>How-To-Repeat:
In a Motif application whose window is put with its bottom edge near the bottom edge of the root window just invoke a pulldown/contextual menu with the cursor at this place.
>Fix:
--- lib/Xm/MenuShell.c.old      2023-04-24 08:55:13.262223558 +0200
+++ lib/Xm/MenuShell.c  2023-04-24 08:56:49.071077100 +0200
@@ -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;


Home | Main Index | Thread Index | Old Index