From nobody Thu Jul 28 16:21:52 2022 X-Original-To: dev-commits-ports-all@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 4Ltwrw2LH5z4XC7D; Thu, 28 Jul 2022 16:21:52 +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 4Ltwrw1vVgz3M2B; Thu, 28 Jul 2022 16:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659025312; 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=0Ub00UZyoeS7DS02M6IlXXjIDLMwUuOqF52htnx1IUQ=; b=j8jUXe3pPxNPbJtt13PbXeYKSrDhlzBugKfUEdY54e0Dz6T/GHPWg/YatBGgf/u1/gtHw1 7E7xNOeFT5QdcIT/LTChNNnbRKS0vwX7QKf6qMI9xaw8DMq5io7qYUxTaqAOXGNXseGUQM nYrLykrdPPdcPUm/M3+EotZ6sMgsBpCfvb78C1qprxYX53DC9Tr18rWq3KnDCGDw2K4sFi FfoY/8LBmVmTJ++VB+rHklenpKlgj1ZTZOaFuNUNr4pUov7fKbpHziRb6lO7NsAgqZYxSr +5TdH6qWWfo9r/D0H5ByOIoyPPOM/4jV1SFayQPNIZ6KFmqbWyhrRVtwaPP1+g== 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 4Ltwrw101Bz12q7; Thu, 28 Jul 2022 16:21:52 +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 26SGLq7v075700; Thu, 28 Jul 2022 16:21:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26SGLqV8075699; Thu, 28 Jul 2022 16:21:52 GMT (envelope-from git) Date: Thu, 28 Jul 2022 16:21:52 GMT Message-Id: <202207281621.26SGLqV8075699@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Cy Schubert Subject: git: 1a37d438f0b4 - 2022Q3 - x11-wm/fvwm3: Avoid crash in FvwmIconMan List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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/2022Q3 X-Git-Reftype: branch X-Git-Commit: 1a37d438f0b40c8a3dd5f098b7b8aac6ad378b1b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659025312; 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=0Ub00UZyoeS7DS02M6IlXXjIDLMwUuOqF52htnx1IUQ=; b=bZZc+Ici6o4kXUpzL0fSzelYp5KGxZUSraNiaXvZEeqMC14bJLQ0GNWPglLiR+81q7zk7y A3hvHvxXtLmKZXMuEWCkH3ADHG3EOsBTsCA+KsF5mhCpFGGaSgh4fP1oeZeTzFQu39RVvg pKMM1+DW9uwICtMbJgCujBZsSNCFtNjo65yoI/O9A0tzQ9Ccfk2EJvna3AvbkaQtmM+uu5 s1asavePrK+V1ukcuGELIMAxIhvgtRr3SkScp/PLug3/QaiQsVHdam21nVLtyQyDnDy+St e5ZMM5b37t889JmMv8D76Flsh76JT+lUUQIR/3alftzxCkrdTsI4+La2j+mHDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659025312; a=rsa-sha256; cv=none; b=NyTHdW1ztWktyuy6A5/Z2TuM6AATT4Zl3hD4SZNA7s/FOeKTpLD+V5W8U7Y7l3tTGLDbeO mZjHYhQsHpNFzpheK7GdkNlzDOTy5gxDUmgsqPchX6nhnZmEHNFbd5nspkwDxYlRMHpnNM x6RsEa/KOPv9MEBZhvL8EpW3G0bx4MhGBewQQuV4IvVfYqUweNJKdROJJXtXbFPNoSbOx9 v1B79p6rVTqU3H9CCqV3Ug0q1sjmZdaJ4HLqkV3OYBf28CU7Ee1VNk41YpkOJHgl+Ru7us RHlorCGwjsex41eP7LfIdejvgxmMs13bkrweTiGP4IjuFtxSr3QClBRPMiRqEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q3 has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=1a37d438f0b40c8a3dd5f098b7b8aac6ad378b1b commit 1a37d438f0b40c8a3dd5f098b7b8aac6ad378b1b Author: Felix Palmen AuthorDate: 2022-07-18 23:20:36 +0000 Commit: Cy Schubert CommitDate: 2022-07-28 16:21:20 +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 (cherry picked from commit 1b4b3e9ce1e7255519f84324f3a7a4c1d7cd3f33) --- 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 da33e0269296..dc76ee8c3a40 100644 --- a/x11-wm/fvwm3/Makefile +++ b/x11-wm/fvwm3/Makefile @@ -2,7 +2,7 @@ PORTNAME= fvwm3 PORTVERSION= 1.0.4 -PORTREVISION= 2 +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? */