From nobody Thu Jul 28 12:57:20 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LtrJx1sjBz4Xgj3; Thu, 28 Jul 2022 12:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LtrJx0qwSz3rwR; Thu, 28 Jul 2022 12:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659013041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=msc6v+sg6y3tUWoQSu3rahpf8pqHB8nP/KlKA3x2VpY=; b=uYDsozJFsPhK/K9Upjx8KVimhTxIWP0e+bfmDHiWyweIIRUJl0wv6nhWzkUF/NHWoJA6ev vdSBNj20BjoVxdbV4zcoYZEKVVzrY9Y9do2H5GwYAGN2t3YZyZbj8sz++4loHh0TFoSSPC xhEVMG1hu559RYynz26Fe5GabHSCNUOtdgk9RyOml05VAba/aE7vsumU17UFwhKVwx4O2t jklHGaf1Syk5aXMD7jYdY4Wv3Ol1pqQsRx0wzkEDJL2FdAeJ27neAmzpNUkff7V4QDHTgo ymr3B/cI+vuUCTsTqpECLDgAgvo7FeoJ9NcFApPNols4lqsYKDkNHH2lzHG1mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LtrJw6tyczx6F; Thu, 28 Jul 2022 12:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26SCvKGt093413; Thu, 28 Jul 2022 12:57:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26SCvKQx093412; Thu, 28 Jul 2022 12:57:20 GMT (envelope-from git) Date: Thu, 28 Jul 2022 12:57:20 GMT Message-Id: <202207281257.26SCvKQx093412@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 1b4b3e9ce1e7 - main - x11-wm/fvwm3: Avoid crash in FvwmIconMan List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b4b3e9ce1e7255519f84324f3a7a4c1d7cd3f33 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659013041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=msc6v+sg6y3tUWoQSu3rahpf8pqHB8nP/KlKA3x2VpY=; b=qLtT/YrcEw5E3WjEJJj4stVE/8cthrecZr3UiUlAXqCmb7uEbXDaAIJjSpg7HI7/3xLcwN FYYHASAHJnITNWiv60e9UJZaNq+bXB1OOj2XPdGLKmbapefyGJBcKAJAzognJj/4/9c/Os mlZxq9BTHdDK3VE8TNJhSpY1AspoHGUoWK7AUX+5SrKpUO1v3hBBGQHV5+QFdO37fx36sg FSSpwcRjknibIhr8nSOzlsuEVBLjFS166J5EnuhPnSDNzCFjOS5Bac57LlHkObsfr9qlsk m3ewTs30KU71fAZL2DM7vgk2+t8e4ph9GMw+SDZpf+6jSf9bbF+Sd+eYFd9xww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659013041; a=rsa-sha256; cv=none; b=vOX1QgTaAeAzdqerG0SHWwBjbo8nshYXj0hllbNrqBiJZUYF0xQUNdnt2g/hUZ8WXiNriL 00WiYnm5SlQ8SkXofrFZZ1023aSdjdpulOUr1QU1C178AXvmhiZhj1DO7HScwRaaXDWbqx YTBI+ll6myjGQSIur4m8yMph/4oKXJ9OlnIt3E76jAJKY5+t0gJ0YbN7UwXeXZ9p7hntKw uldAz7ybfM8dfQoSmDFRhMnB6tzA6erHWPj12+9tUjToLQQAq7cJRFxqlULLAPBvzutE0Y 9Y/xmJXf/eszqS7VdyK7et81qz6bgwNRc6JKXUHO+hw8Zia4Nm+D13l8z+bPAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=1b4b3e9ce1e7255519f84324f3a7a4c1d7cd3f33 commit 1b4b3e9ce1e7255519f84324f3a7a4c1d7cd3f33 Author: Felix Palmen AuthorDate: 2022-07-18 23:20:36 +0000 Commit: Cy Schubert CommitDate: 2022-07-28 12:56:00 +0000 x11-wm/fvwm3: Avoid crash in FvwmIconMan Add a patch working around the crash by initializing some struct member to NULL that's otherwise used uninitialized and backporting some code from upstream's main branch to correctly handle that case. PR: 265291 MFH: 2022Q3 --- x11-wm/fvwm3/Makefile | 2 +- x11-wm/fvwm3/files/patch-pr265291 | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/x11-wm/fvwm3/Makefile b/x11-wm/fvwm3/Makefile index ed384f122d7b..3d1424cb679b 100644 --- a/x11-wm/fvwm3/Makefile +++ b/x11-wm/fvwm3/Makefile @@ -1,6 +1,6 @@ PORTNAME= fvwm3 PORTVERSION= 1.0.4 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= x11-wm MASTER_SITES= https://github.com/fvwmorg/fvwm3/releases/download/${PORTVERSION}/ \ http://fvwm.sourceforge.net/generated/icon_download/:icons diff --git a/x11-wm/fvwm3/files/patch-pr265291 b/x11-wm/fvwm3/files/patch-pr265291 new file mode 100644 index 000000000000..59fa97e71389 --- /dev/null +++ b/x11-wm/fvwm3/files/patch-pr265291 @@ -0,0 +1,51 @@ +Avoid a crash caused by UB (use of uninitialized value). + +Initialize a value to NULL and backport code handling this case from main. +This won't hurt and avoids the crash, although it's probably not the correct +fix. + +Upstream issue: https://github.com/fvwmorg/fvwm3/issues/659 + +--- modules/FvwmIconMan/x.c.orig 2022-07-18 23:18:50 UTC ++++ modules/FvwmIconMan/x.c +@@ -742,6 +742,7 @@ void X_init_manager (int man_id) + char *scr; + fscreen_scr_arg arg; + arg.mouse_ev = NULL; ++ arg.name = NULL; + + geometry_mask = FScreenParseGeometryWithScreen( + man->geometry_str, &man->geometry.x, &man->geometry.y, +--- libs/FScreen.c.orig 2022-07-21 10:39:30 UTC ++++ libs/FScreen.c +@@ -186,6 +186,11 @@ monitor_resolve_name(const char *scr) + { + struct monitor *m = NULL; + ++ if (scr == NULL) ++ { ++ return NULL; ++ } ++ + /* Assume the monitor name is a literal RandR name (such as HDMI2) and + * look it up regardless. + */ +@@ -698,11 +703,14 @@ FindScreen(fscreen_scr_arg *arg, fscreen_scr_t screen) + m = FindScreenOfXY(arg->xypos.x, arg->xypos.y); + break; + case FSCREEN_BY_NAME: +- if (arg == NULL || arg->name == NULL) { +- /* XXX: Work out what to do. */ +- break; ++ if (arg == NULL || arg->name == NULL) ++ { ++ m = monitor_by_primary(); + } +- m = monitor_resolve_name(arg->name); ++ else ++ { ++ m = monitor_resolve_name(arg->name); ++ } + break; + default: + /* XXX: Possible error condition here? */