NetBSD Problem Report #57754

From www@netbsd.org  Tue Dec  5 17:00:53 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 99BF61A9238
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  5 Dec 2023 17:00:53 +0000 (UTC)
Message-Id: <20231205170052.DE7021A9239@mollari.NetBSD.org>
Date: Tue,  5 Dec 2023 17:00:52 +0000 (UTC)
From: tlaronde@kergis.com
Reply-To: tlaronde@kergis.com
To: gnats-bugs@NetBSD.org
Subject: Motif bug in MenuShell
X-Send-Pr-Version: www-1.0

>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;

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.