From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1CC0D158094 for ; Wed, 17 Aug 2022 16:21:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 31014E08FA; Wed, 17 Aug 2022 16:21:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0EE4EE08F7 for ; Wed, 17 Aug 2022 16:21:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 30AD9341360 for ; Wed, 17 Aug 2022 16:21:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5E09557D for ; Wed, 17 Aug 2022 16:21:23 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1660753265.e651007753d2b9c3a66a3ec2dd7f6913ed738e37.mattst88@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/jbig2dec/files/, media-libs/jbig2dec/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/jbig2dec/Manifest media-libs/jbig2dec/files/jbig2dec-0.18-extra-overflow-checks.patch media-libs/jbig2dec/files/jbig2dec-0.18-overflow-IAID.patch media-libs/jbig2dec/jbig2dec-0.18.ebuild X-VCS-Directories: media-libs/jbig2dec/ media-libs/jbig2dec/files/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: e651007753d2b9c3a66a3ec2dd7f6913ed738e37 X-VCS-Branch: master Date: Wed, 17 Aug 2022 16:21:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f597b5f-6244-455c-aab9-af8fafdb0562 X-Archives-Hash: 6e905e1357693ba164a70b26d9c588df commit: e651007753d2b9c3a66a3ec2dd7f6913ed738e37 Author: Matt Turner gentoo org> AuthorDate: Wed Aug 17 13:44:49 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed Aug 17 16:21:05 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6510077 media-libs/jbig2dec: Drop old versions Signed-off-by: Matt Turner gentoo.org> media-libs/jbig2dec/Manifest | 1 - .../jbig2dec-0.18-extra-overflow-checks.patch | 51 --------------- .../files/jbig2dec-0.18-overflow-IAID.patch | 36 ----------- media-libs/jbig2dec/jbig2dec-0.18.ebuild | 73 ---------------------- 4 files changed, 161 deletions(-) diff --git a/media-libs/jbig2dec/Manifest b/media-libs/jbig2dec/Manifest index 3f593faa8362..10afa8ffcdf4 100644 --- a/media-libs/jbig2dec/Manifest +++ b/media-libs/jbig2dec/Manifest @@ -1,3 +1,2 @@ DIST jb2streams.zip 1285838 BLAKE2B 9a2b6047a7b970439693d6f5fdefb9488019a562e7f831288b27df09bb19dec2f84854cf7fea50b5b041d331e925145f37f2f89848058ecdc074e7d6c238033f SHA512 382890b36345b8aaebb3554e776a53f3276c6d835335ce41f3f41829ff62bba7ae646602544103ba8541a7a824dca92d682b682c254ab2918c7fe45b3e358b45 -DIST jbig2dec-0.18.tar.gz 148563 BLAKE2B a864fd5b00abca3ae0f847c1d8fd537d92d68a3c042c851b6bebd51bb674f5bc4a36811f2b4fd7753db4d3641e544e03ec184cb90d43da0247d8affd7cf62c11 SHA512 5931530ee3b811f9009c95d08ad65701564ef8ebf6511145acb969cc7c99dab5028daaee580dd83358b6bdc477cffe347712b9c9768c9b1a63395e366046267d DIST jbig2dec-0.19.tar.gz 149134 BLAKE2B 576f3a516499b6291d25dfdefe5af62899665167526dca11435bc07e04a3feb707f82d3a8bdda774f5cfe0d792c3147e77aa94fa57feac25ba1c0a7805c5fc58 SHA512 d5a27951cc9c06c184f454e258e81b6e4d5aa2742a4da821522b9a42ecc78e7e1b78058dabc23821618e62d62d8832011f16b5ef2d66beac463da6b809fd02af diff --git a/media-libs/jbig2dec/files/jbig2dec-0.18-extra-overflow-checks.patch b/media-libs/jbig2dec/files/jbig2dec-0.18-extra-overflow-checks.patch deleted file mode 100644 index 52a7f448e6f3..000000000000 --- a/media-libs/jbig2dec/files/jbig2dec-0.18-extra-overflow-checks.patch +++ /dev/null @@ -1,51 +0,0 @@ -https://github.com/ArtifexSoftware/jbig2dec/commit/873694419b3498708b90c5c36ee0a73795a90c84 ----- -From 873694419b3498708b90c5c36ee0a73795a90c84 Mon Sep 17 00:00:00 2001 -From: Sebastian Rasmussen -Date: Sun, 15 Sep 2019 17:31:48 +0200 -Subject: [PATCH] jbig2dec: Handle under-/overflow detection and messaging - better. - -Previously SYMWIDTH was capped too early in order to prevent underflow -Moreover TOTWIDTH was allowed to overflow. - -Now the value DW is checked compared to SYMWIDTH, preventing over -underflow and overflow at the correct limits, and an overflow -check has been added for TOTWIDTH. ---- - jbig2_symbol_dict.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/jbig2_symbol_dict.c b/jbig2_symbol_dict.c -index e606529..bc6e98c 100644 ---- a/jbig2_symbol_dict.c -+++ b/jbig2_symbol_dict.c -@@ -428,14 +428,24 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, - break; - } - -+ if (DW < 0 && SYMWIDTH < (uint32_t) -DW) { -+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "DW value (%d) would make SYMWIDTH (%u) negative at symbol %u", DW, SYMWIDTH, NSYMSDECODED + 1); -+ goto cleanup; -+ } -+ if (DW > 0 && DW > UINT32_MAX - SYMWIDTH) { -+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "DW value (%d) would make SYMWIDTH (%u) too large at symbol %u", DW, SYMWIDTH, NSYMSDECODED + 1); -+ goto cleanup; -+ } -+ - SYMWIDTH = SYMWIDTH + DW; -- TOTWIDTH = TOTWIDTH + SYMWIDTH; -- if ((int32_t) SYMWIDTH < 0) { -- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "invalid SYMWIDTH value (%d) at symbol %d", SYMWIDTH, NSYMSDECODED + 1); -+ if (SYMWIDTH > UINT32_MAX - TOTWIDTH) { -+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "SYMWIDTH value (%u) would make TOTWIDTH (%u) too large at symbol %u", SYMWIDTH, TOTWIDTH, NSYMSDECODED + 1); - goto cleanup; - } -+ -+ TOTWIDTH = TOTWIDTH + SYMWIDTH; - #ifdef JBIG2_DEBUG -- jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number, "SYMWIDTH = %d TOTWIDTH = %d", SYMWIDTH, TOTWIDTH); -+ jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number, "SYMWIDTH = %u TOTWIDTH = %u", SYMWIDTH, TOTWIDTH); - #endif - /* 6.5.5 (4c.ii) */ - if (!params->SDHUFF || params->SDREFAGG) { diff --git a/media-libs/jbig2dec/files/jbig2dec-0.18-overflow-IAID.patch b/media-libs/jbig2dec/files/jbig2dec-0.18-overflow-IAID.patch deleted file mode 100644 index 7205c980fc28..000000000000 --- a/media-libs/jbig2dec/files/jbig2dec-0.18-overflow-IAID.patch +++ /dev/null @@ -1,36 +0,0 @@ -https://github.com/ArtifexSoftware/jbig2dec/commit/f6d326878893dc92b45cbd18e25ab4d2b3a8db73 ----- -From f6d326878893dc92b45cbd18e25ab4d2b3a8db73 Mon Sep 17 00:00:00 2001 -From: Sebastian Rasmussen -Date: Sun, 15 Sep 2019 18:12:31 +0200 -Subject: [PATCH] jbig2dec: Add overflow detection for IAID context size. - ---- - jbig2_arith_iaid.c | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/jbig2_arith_iaid.c b/jbig2_arith_iaid.c -index 78dc830..bbc38a0 100644 ---- a/jbig2_arith_iaid.c -+++ b/jbig2_arith_iaid.c -@@ -44,9 +44,18 @@ struct _Jbig2ArithIaidCtx { - Jbig2ArithIaidCtx * - jbig2_arith_iaid_ctx_new(Jbig2Ctx *ctx, int SBSYMCODELEN) - { -- Jbig2ArithIaidCtx *result = jbig2_new(ctx, Jbig2ArithIaidCtx, 1); -- int ctx_size = 1 << SBSYMCODELEN; -+ Jbig2ArithIaidCtx *result; -+ size_t ctx_size; - -+ if (sizeof(ctx_size) * 8 <= SBSYMCODELEN) -+ { -+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "requested IAID arithmetic coding state size too large"); -+ return NULL; -+ } -+ -+ ctx_size = 1 << SBSYMCODELEN; -+ -+ result = jbig2_new(ctx, Jbig2ArithIaidCtx, 1); - if (result == NULL) { - jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to allocate IAID arithmetic coding state"); - return NULL; diff --git a/media-libs/jbig2dec/jbig2dec-0.18.ebuild b/media-libs/jbig2dec/jbig2dec-0.18.ebuild deleted file mode 100644 index fd2742d804a1..000000000000 --- a/media-libs/jbig2dec/jbig2dec-0.18.ebuild +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit autotools python-any-r1 - -DESCRIPTION="A decoder implementation of the JBIG2 image compression format" -HOMEPAGE="https://jbig2dec.com/" -SRC_URI="https://github.com/ArtifexSoftware/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz - test? ( http://jbig2dec.sourceforge.net/ubc/jb2streams.zip )" - -LICENSE="AGPL-3" -SLOT="0/$(ver_cut 1-2)" #698428 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="png static-libs test" -RESTRICT="!test? ( test )" - -BDEPEND=" - test? ( - app-arch/unzip - ${PYTHON_DEPS} - ) -" - -RDEPEND="png? ( media-libs/libpng:0= )" -DEPEND="${RDEPEND}" - -DOCS=( CHANGES README ) - -PATCHES=( - "${FILESDIR}/${P}-extra-overflow-checks.patch" - "${FILESDIR}/${P}-overflow-IAID.patch" -) - -pkg_setup() { - use test && python-any-r1_pkg_setup -} - -src_prepare() { - default - - if use test; then - mkdir "${WORKDIR}/ubc" || die - mv -v "${WORKDIR}"/*.jb2 "${WORKDIR}/ubc/" || die - mv -v "${WORKDIR}"/*.bmp "${WORKDIR}/ubc/" || die - fi - - # We only need configure.ac and config_types.h.in - sed -i \ - -e '/^# do we need automake?/,/^autoheader/d' \ - -e '/echo " $AUTOM.*/,$d' \ - autogen.sh \ - || die "failed to modify autogen.sh" - - ./autogen.sh || die - - eautoreconf -} - -src_configure() { - econf \ - $(use_enable static-libs static) \ - $(use_with png libpng) -} - -src_install() { - default - - find "${ED}" -name '*.la' -exec rm {} + || die -}