From nobody Thu May 16 00:03:59 2024 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 4Vfr0v5VvRz5K6Cr; Thu, 16 May 2024 00:03:59 +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 4Vfr0v4vynz4Nts; Thu, 16 May 2024 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715817839; 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=hIc4pqb0+MSwBIIJQxhEuz4njHDDPg3fVzpq6a6wXZI=; b=ECVazDQAPrFCJ7941vaknNr4SJzDA34bf7SqVdd7z7LthMtWvVCsxEBrQUSL7jqFuvBuvH cb7awlB+lK/NZrBg+ThoVZHc/2HTlo8/Dbe0N3Z30+3cIxGmI8+N1jjm8bVC2LNefMjJFq gSwyz2e8FFWSi1A/h/3ernYPoODVwdBBDjtRal0fwco12UiSuOgWUtVm/6SO2Mbvxunj0t g9z3flv6vYeGX2Eb61T0hCtg/JB8cEbGXkkEA5bFoo0IUYI5H6zE/HJkmawyksvWYUIvX0 edAj8S3KWVIAqKXu+Nq8/NFLHHS1xS4TKuiZK+6uELLGxvyXXcWll7pkwEDWxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715817839; a=rsa-sha256; cv=none; b=suvb2CjZo8Y+CUcB9UwdtWODCnSbjSxGUOU4SptuhbdGJifksZ4iXel1TjTVWEJRWFYj3f Xkhfr0jshgTI1eylMPXH4S71F9dzbr1xy5W227uTNsTACiB5S6gHe7vk4lIK8WFBXghvGt vaQNZvlWUizjk3OvDfefrHO4Yl3pBZ0FWvoosNqMu+bGWduu8Ep85Lcprl1BYMdzjGjnsE zXbNjUWiWGjv4zdOglZ9S1aTvyEC7hfsir6C+Y+m58EnqCH5uJ+itGBnCx5ms6j24Uu34I +2UUMQtypRSII1xGgKyotRGC+aG5WS1CvmpKyJQmjh9RYn5H3QEDGFBpIBSliQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715817839; 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=hIc4pqb0+MSwBIIJQxhEuz4njHDDPg3fVzpq6a6wXZI=; b=ayasUwfaU1NGuJrSr0bNoJ+55UOLII08M57N12FST1tZhR+8NZYjiq/3ADJmlm2vJeEEDj /f2f6iDJtJBWQ26J5k+Ah77JlzGY/LTCN8/4m7u80ZnivK0GwUAIZmQlwF6gMnpSnz2tPc CYZXlsMu92Ee+DLw188R44FaS30c8EeJS8Zi8CwVjiTWQDM2Z3W2+zhSCAUkIRY/jtwTam 6KkcevAeiSmP1UqpptZ9Al07rtU+KU1+9hb1CPtAyw/0BfjVXLVi1N05K7+LTBFrP+dKSl 2R7/DYWmpyoEundYnrALxFn5hYJVlOUmPl5rQJoTV76m2KV65k6aI787HXpGTA== 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 4Vfr0v4WFRzcND; Thu, 16 May 2024 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44G03xle086568; Thu, 16 May 2024 00:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44G03xxC086565; Thu, 16 May 2024 00:03:59 GMT (envelope-from git) Date: Thu, 16 May 2024 00:03:59 GMT Message-Id: <202405160003.44G03xxC086565@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: 99bafb68144c - main - audio/rsgain: Fix segmentation fault 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99bafb68144c1824441d3b47c3dc141c7721148b Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=99bafb68144c1824441d3b47c3dc141c7721148b commit 99bafb68144c1824441d3b47c3dc141c7721148b Author: Jason E. Hale AuthorDate: 2024-05-15 23:56:38 +0000 Commit: Jason E. Hale CommitDate: 2024-05-16 00:03:53 +0000 audio/rsgain: Fix segmentation fault When calculating album loudness on a drectory containing one or more audio files using `rsgain easy .`, for example, a segmentation fault can occur. Affects versions 3.4 and 3.5. PR: 278838 Reported by: MFH: 2024Q2 --- audio/rsgain/Makefile | 1 + audio/rsgain/files/patch-src_scan.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/audio/rsgain/Makefile b/audio/rsgain/Makefile index 77f2e7f5f933..0c4d8bd4aa04 100644 --- a/audio/rsgain/Makefile +++ b/audio/rsgain/Makefile @@ -1,5 +1,6 @@ PORTNAME= rsgain DISTVERSION= 3.5 +PORTREVISION= 1 DISTVERSIONSUFFIX= -source CATEGORIES= audio MASTER_SITES= https://github.com/complexlogic/rsgain/releases/download/v${DISTVERSION}/ diff --git a/audio/rsgain/files/patch-src_scan.cpp b/audio/rsgain/files/patch-src_scan.cpp new file mode 100644 index 000000000000..3d9dbb23b23f --- /dev/null +++ b/audio/rsgain/files/patch-src_scan.cpp @@ -0,0 +1,16 @@ +Fix a segfault when calculating album loudness. + +PR: 278838 +Regressed by: https://github.com/complexlogic/rsgain/commit/63e87a4f7d3b5c816eab630fba41ba9a63b82519 + +--- src/scan.cpp.orig 2024-02-25 17:47:20 UTC ++++ src/scan.cpp +@@ -639,7 +639,7 @@ void ScanJob::calculate_album_loudness() + std::vector states(nb_states); + for (const Track &track : tracks) + if (track.result.track_loudness != -HUGE_VAL) +- states.emplace_back(track.ebur128.get()); ++ states[(size_t) (&track - &tracks[0])] = track.ebur128.get(); + + if (ebur128_loudness_global_multiple(states.data(), states.size(), &album_loudness) != EBUR128_SUCCESS) + album_loudness = config.target_loudness;