public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/colord/, x11-misc/colord/files/
Date: Fri, 16 Dec 2022 02:52:14 +0000 (UTC)	[thread overview]
Message-ID: <1671159124.67eefb25d66a312e6d4ecdf3ff6bb4c7f4847137.sam@gentoo> (raw)

commit:     67eefb25d66a312e6d4ecdf3ff6bb4c7f4847137
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 16 02:16:12 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 16 02:52:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67eefb25

x11-misc/colord: backport lcms 2 fix

Closes: https://bugs.gentoo.org/880865
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...{colord-1.4.6.ebuild => colord-1.4.6-r1.ebuild} |  4 +++
 .../files/colord-1.4.6-lcms2-corruption.patch      | 33 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/x11-misc/colord/colord-1.4.6.ebuild b/x11-misc/colord/colord-1.4.6-r1.ebuild
similarity index 98%
rename from x11-misc/colord/colord-1.4.6.ebuild
rename to x11-misc/colord/colord-1.4.6-r1.ebuild
index 6b1521b25a0a..58918a6d770d 100644
--- a/x11-misc/colord/colord-1.4.6.ebuild
+++ b/x11-misc/colord/colord-1.4.6-r1.ebuild
@@ -57,6 +57,10 @@ BDEPEND="
 	vala? ( $(vala_depend) )
 "
 
+PATCHES=(
+	"${FILESDIR}"/${P}-lcms2-corruption.patch
+)
+
 src_prepare() {
 	default
 	use vala && vala_src_prepare

diff --git a/x11-misc/colord/files/colord-1.4.6-lcms2-corruption.patch b/x11-misc/colord/files/colord-1.4.6-lcms2-corruption.patch
new file mode 100644
index 000000000000..4df6773cfb4b
--- /dev/null
+++ b/x11-misc/colord/files/colord-1.4.6-lcms2-corruption.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/880865
+
+https://github.com/mm2/Little-CMS/issues/344
+https://github.com/hughsie/colord/issues/145
+
+https://github.com/hughsie/colord/commit/91a3cc2e994be587def3b70762f15461101d43a1
+
+From 91a3cc2e994be587def3b70762f15461101d43a1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 15 Nov 2022 17:03:37 +0000
+Subject: [PATCH] lib: avoid destructing LCMS plugin twice with lcms 2.14
+
+lcms 2.14 contains a change to avoid a memory leak, but that change
+assumes correct API usage. It's not necessary to both cmsUnregisterPluginsTHR()
+and then cmsDeleteContext() -- we can just straight up delete the LCMS
+context instead (cmsDeleteContext()).
+
+So, follow upstream's suggestion & do that. This fixes memory corruption
+when building colord on x86, for example.
+
+Bug: https://github.com/mm2/Little-CMS/issues/344
+Fixes: https://github.com/hughsie/colord/issues/145
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/lib/colord/cd-context-lcms.c
++++ b/lib/colord/cd-context-lcms.c
+@@ -163,7 +163,6 @@ cd_context_lcms_free (gpointer ctx)
+ 	g_clear_error (error_ctx);
+ 	g_free (error_ctx);
+ 
+-	cmsUnregisterPluginsTHR (ctx);
+ 	cmsDeleteContext (ctx);
+ }
+ 


             reply	other threads:[~2022-12-16  2:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16  2:52 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-13 10:37 [gentoo-commits] repo/gentoo:master commit in: x11-misc/colord/, x11-misc/colord/files/ Mart Raudsepp
2021-05-01 18:25 Matt Turner
2021-04-29  1:56 Matt Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1671159124.67eefb25d66a312e6d4ecdf3ff6bb4c7f4847137.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox