From nobody Tue Dec 14 13:20:51 2021 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 7F7F718DC2DC; Tue, 14 Dec 2021 13:20:51 +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 4JCzXM1c3Wz4XpQ; Tue, 14 Dec 2021 13:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 178E9DB8; Tue, 14 Dec 2021 13:20:51 +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 1BEDKpab024644; Tue, 14 Dec 2021 13:20:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BEDKpPR024643; Tue, 14 Dec 2021 13:20:51 GMT (envelope-from git) Date: Tue, 14 Dec 2021 13:20:51 GMT Message-Id: <202112141320.1BEDKpPR024643@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Hiroki Tagato Subject: git: 03d66a4c640d - main - devel/electron13: fix obtaining HOST_NAME_MAX 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: tagattie X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03d66a4c640d3363f919b29d0298f6e132bfda48 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639488051; 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=IuDACKud39ePTXJU8gAdZh3iYc5LPPHFINpo2Zz2tV0=; b=uPdvDtMa4Yo9bz+MC5ei2DH0AozKgtWZsxzIz5ajMKunN0K/yhiiOQzqKVzW324XnFmZ+b YgCAs+/MU3EGVDq+eViU3gX6sE9urZ5ABICLGQPSYoQSy5tf6cmhZRM4tUrfGzCmhrx/MX v/Bo0WqQyonevhYGLx3hxwAytiV3R1UKnzC46epFsie1RG/jKkdgT7QW1wfT2Nqnwo1iKq RgBD3CCNAid4bgTVEk0UdzAM0KP0py35gkDLb4/Wm7A9IkwgzpDBFnEv4kma6XZ3eR/0cZ KAGGJ4IjAtkVJ2gp+VfU38NxCgt9DQCunyPFiMxTjfShsW5KUFZxiFaSHhaFGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639488051; a=rsa-sha256; cv=none; b=MhpwiFV4mCs17HtW9Vf8jc2ClBBcsrHraIRqw59DsWQomwk5VrvYjqYY6WV311f82l2lti ss1Y1f6FOLuOk/w5Ai0scs8v7F61v4GGUqvMIBwmyYNW4R0wRrYghGhS4PiWatwP2zEo7g v0MRq91exFMavQan2pH2kWu5Hb+kod/5OLedeHQifCrZY1jBMnVqRDmlg7ePEG36efna+b /Vtj5gR+27y6QNJIVQTWW42XVWcZ+HBWDAUaVgwVg+mLIAbdWn1tRvfPK3kAQcofCfOmBT ZuzvkjWRriGNWGDw9046ItS7xCo1xKYF+3AA5Qa10jEjlyyZqen18wqZefW/eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tagattie: URL: https://cgit.FreeBSD.org/ports/commit/?id=03d66a4c640d3363f919b29d0298f6e132bfda48 commit 03d66a4c640d3363f919b29d0298f6e132bfda48 Author: Adam Wolk AuthorDate: 2021-12-14 13:18:04 +0000 Commit: Hiroki Tagato CommitDate: 2021-12-14 13:20:27 +0000 devel/electron13: fix obtaining HOST_NAME_MAX Using sysconf(3) API lead to accidental introduction of variable length arrays (VLA) in the port. Additionally gethostname(3) has been passed _SC_HOST_NAME_MAX incorrectly as the HOST_NAME_MAX length. Fall back to using _POSIX_HOST_NAME_MAX as the remaining code is not ready for introducing sysconf(3) as a patch. Bump PORTREVISION to rebuild with the new patch. The patch was lifted from www/chromium which has a similar diff pending. Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D30064 --- devel/electron13/Makefile | 2 +- ...onents_sync__device__info_local__device__info__util__linux.cc | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/devel/electron13/Makefile b/devel/electron13/Makefile index c8b7765fd90a..ab0af69b4f01 100644 --- a/devel/electron13/Makefile +++ b/devel/electron13/Makefile @@ -1,7 +1,7 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:chromium \ https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts diff --git a/devel/electron13/files/patch-components_sync__device__info_local__device__info__util__linux.cc b/devel/electron13/files/patch-components_sync__device__info_local__device__info__util__linux.cc index 7ffeb716b5f4..d3186df824fc 100644 --- a/devel/electron13/files/patch-components_sync__device__info_local__device__info__util__linux.cc +++ b/devel/electron13/files/patch-components_sync__device__info_local__device__info__util__linux.cc @@ -1,14 +1,13 @@ ---- components/sync_device_info/local_device_info_util_linux.cc.orig 2021-04-14 01:08:47 UTC +--- components/sync_device_info/local_device_info_util_linux.cc.orig 2021-07-15 19:13:38 UTC +++ components/sync_device_info/local_device_info_util_linux.cc -@@ -38,8 +38,9 @@ std::string GetPersonalizableDeviceNameInternal() { +@@ -38,8 +38,8 @@ std::string GetPersonalizableDeviceNameInternal() { #if BUILDFLAG(IS_CHROMEOS_ASH) return GetChromeOSDeviceNameFromType(); #else - char hostname[HOST_NAME_MAX]; - if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success. -+ int len = sysconf(_SC_HOST_NAME_MAX); -+ char hostname[len]; -+ if (gethostname(hostname, _SC_HOST_NAME_MAX) == 0) // Success. ++ char hostname[_POSIX_HOST_NAME_MAX]; ++ if (gethostname(hostname, _POSIX_HOST_NAME_MAX) == 0) // Success. return hostname; return base::GetLinuxDistro(); #endif