From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id cLLJMSgj7GV/nwAA62LTzQ:P1 (envelope-from ) for ; Sat, 09 Mar 2024 09:51:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cLLJMSgj7GV/nwAA62LTzQ (envelope-from ) for ; Sat, 09 Mar 2024 09:51:52 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniA header.b="E OxvDc/"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709974312; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0kgIWt7khSU7TDUP86UzzD9G3Wfhq08q+mawvbTTCx8=; b=YVbG3tOLNYzLSNa9badFbaxrS8awhe9ayOXQjKrES0RKqIdexdkcW5iPaPjv1VXMO5Tg8F tPjgUOX/qlqrRC8YbIXcCBr4wMfbXRDnh59ao6DXrcsNpT98Q7FGyUZ2hU144KJXtUfGOt YUyh510WEOZ60aRT14zCNKJ3SU5rzRySepakyciXC20u1rj8CL6XkEIoDgAQuZ42O1Ytjm 7QESElz+p40RPjT2LkMybg7W9xUgJWMNoFA0QIyD20qgWOBUX2mRTQZlMwtHsnZ7Aw8dns BOe+DUn7eekgfTuUy+TbZtJl+vMgkdW8nQ9iJfvOFud/IgzmsFpffSxjLqqJIQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709974312; a=rsa-sha256; cv=none; b=FKsaDjHteL6GZ2Y8fbaAhufsSi3fq2aBXT+cBH+vSwo5dnhmwTfHuaf9+no84mMjs5jjcv TCF/fcvvbDFDaXp8JDZAf83FIXKTN+QCyXFGbfCNjQqC0C56ymkut62DWI9kP8M5NvqGKZ uNsdxPNN2QQQzXW01ftEMBoP1rd9RHqfN7NTMIweSyvmm/dmJwqJ2xjLRSiJLiHWqrWSyW pKqmZQRhQLKTq09S2is9f9oTP+llelakU4vva6LTifMmYqUUOxkgfDNcYbuAxDgC7FawlP /Jp0+MfReh4eG1jVH8oua8aUROUko/+0sARxG12rugN6+7jigx36FH4wjLpeyA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniA header.b="E OxvDc/"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 59EF158AD0 for ; Sat, 9 Mar 2024 09:51:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1risQe-0002fQ-OS; Sat, 09 Mar 2024 03:51:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1risQV-0002dN-GM for guix-patches@gnu.org; Sat, 09 Mar 2024 03:51:31 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1risQV-000098-7m for guix-patches@gnu.org; Sat, 09 Mar 2024 03:51:31 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1risR1-0003eq-Or for guix-patches@gnu.org; Sat, 09 Mar 2024 03:52:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69652] [PATCH gnome-team v2 3/3] gnu: orbit2: Fix bug on 32-bit systems. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Mar 2024 08:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69652 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69652@debbugs.gnu.org Cc: rg@raghavgururajan.name, vivien@planete-kraus.eu, liliana.prikler@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 69652-submit@debbugs.gnu.org id=B69652.170997427813979 (code B ref 69652); Sat, 09 Mar 2024 08:52:03 +0000 Received: (at 69652) by debbugs.gnu.org; 9 Mar 2024 08:51:18 +0000 Received: from localhost ([127.0.0.1]:60586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1risQH-0003dP-Sp for submit@debbugs.gnu.org; Sat, 09 Mar 2024 03:51:18 -0500 Received: from planete-kraus.eu ([89.234.140.182]:56370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1risQF-0003cj-81 for 69652@debbugs.gnu.org; Sat, 09 Mar 2024 03:51:15 -0500 Received: from planete-kraus.eu (localhost [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 8b78fd01; Sat, 9 Mar 2024 08:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniA; bh=2LJiRewNXuaPpV19jFM3RUfAinE=; b=E OxvDc/xWbHVyFKt+JcI8zSoPj5SuC2CmRXueP0eCRRwbyoD/9XIOO6lb2hO465yh jnnsg9G4WzGETaMW9Le6RqLlyqiasGzgeP7frFk0uBlaH0mBiJkuSXHH/3utzPI+ 5mC2YR6VTdZnhHYApya2SK65qdvIOjzGIInqsFiiMvKzPy9bW+LFpjpAnoz+kPYn SZU5RoNnIqphYyOcbOHj4190DnJfDTEO0tRS5Bx5JPvvJ5Oz239/p9TerIF6FyUN 5UtYUTz6rjJqTSeGsnk1z3PERQEFav9OEykkwWO09OBOg2m4oodbfzp8HjVskHjr aMVMTZ0ALWChm6ZTPlGDg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id d804878e (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sat, 9 Mar 2024 08:50:39 +0000 (UTC) Message-ID: <6bb82d56807c366da0609ea763a01b18205baf2b.1709974034.git.vivien@planete-kraus.eu> In-Reply-To: References: Date: Sat, 9 Mar 2024 09:43:19 +0100 MIME-Version: 1.0 User-Agent: Evolution 3.48.4 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches From: Vivien Kraus via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.28 X-Spam-Score: -5.28 X-Migadu-Queue-Id: 59EF158AD0 X-Migadu-Scanner: mx11.migadu.com X-TUID: M65JtW0CEyqU * gnu/packages/patches/orbit2-fix-array-allocation-32bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/gnome.scm (orbit2): Use it here. Change-Id: I72e10fc9d8a5421a7ec6b4ccf1425008b322ea3f --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 4 +- .../orbit2-fix-array-allocation-32bit.patch | 40 +++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/orbit2-fix-array-allocation-32bit.patch diff --git a/gnu/local.mk b/gnu/local.mk index dcd320fec4..9fbfc754a0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1781,6 +1781,7 @@ dist_patch_DATA = \ %D%/packages/patches/opentaxsolver-file-browser-fix.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ %D%/packages/patches/orangeduck-mpc-fix-pkg-config.patch \ + %D%/packages/patches/orbit2-fix-array-allocation-32bit.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/osip-CVE-2017-7853.patch \ %D%/packages/patches/ots-no-include-missing-file.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 8b69a231af..103065141e 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -3797,7 +3797,9 @@ (define-public orbit2 upstream-name "-" version ".tar.bz2"))) (sha256 (base32 - "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam")))) + "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam")) + (patches + (search-patches "orbit2-fix-array-allocation-32bit.patch")))) (build-system gnu-build-system) (arguments (list diff --git a/gnu/packages/patches/orbit2-fix-array-allocation-32bit.patch b/gnu/packages/patches/orbit2-fix-array-allocation-32bit.patch new file mode 100644 index 0000000000..377c09d0a5 --- /dev/null +++ b/gnu/packages/patches/orbit2-fix-array-allocation-32bit.patch @@ -0,0 +1,40 @@ +From 28067b88ad91e794675734bc92bd9c8653b4a46a Mon Sep 17 00:00:00 2001 +Message-ID: <28067b88ad91e794675734bc92bd9c8653b4a46a.1709973702.git.vivien@planete-kraus.eu> +From: Vivien Kraus +Date: Sat, 9 Mar 2024 09:36:56 +0100 +Subject: [PATCH] corba-loc: Do not allocate more tokens than necessary. + +To split the list of locations, the code calls g_strsplit with the +last argument set to G_MAXINT. It means that g_strsplit will try to +allocate a huge array (G_MAXINT + 1, for the final NULL), mostly +filled with NULL. Unfortunately, on 32-bit systems, this is one past +the authorized length for an array. Previous versions of glib would +not care, but the new version now raises an error if this happens. + +To get an array of the appropriate size, we can just pass -1 to the +last argument. + +* src/orb/orb-core/corba-loc.c (ORBit_corbaloc_parse): Replace +G_MAXINT with -1. +--- + src/orb/orb-core/corba-loc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/orb/orb-core/corba-loc.c b/src/orb/orb-core/corba-loc.c +index abfcaa29..6492d392 100644 +--- a/src/orb/orb-core/corba-loc.c ++++ b/src/orb/orb-core/corba-loc.c +@@ -309,7 +309,7 @@ ORBit_corbaloc_parse (const gchar *corbaloc) + if (!(objkey = orbit_url_decode (okey))) + goto ret_error; + +- if (!(token = g_strsplit (loc, ",", G_MAXINT))) ++ if (!(token = g_strsplit (loc, ",", -1))) + goto ret_error; + + /* [ 'iiop' ] ':' [ '//' ] [ version '@' ] host [ ':' port ] */ + +base-commit: 144be2e9860286c83f009e7689250e0af977cc5e +-- +2.41.0 + -- 2.41.0