guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.

commit 8908b13e07dadf335636a25bca5f707642d15243
Author: FuncProgLinux <[email protected]>
AuthorDate: Sat Oct 10 19:07:21 2026 -0600

    gnu: itstool: Fix segfault when merging translations.
    
    * gnu/packages/glib.scm (itstool)[source]: Add patch.
    * gnu/packages/patches/itstool-fix-segfault.patch: New file.
    
    Signed-off-by: Liliana Marie Prikler <[email protected]>
    Merges: guix/guix#11769
---
 gnu/packages/glib.scm                           |  4 +++-
 gnu/packages/patches/itstool-fix-segfault.patch | 11 +++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 6251ab97b72..bb0488c76e5 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -714,7 +714,9 @@ The intltool collection can be used to do these things:
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "1jl7gsr7aclb9nvqazr039m86y7f7ivfhl2pixcrbfqjkb97r6kb"))))
+               "1jl7gsr7aclb9nvqazr039m86y7f7ivfhl2pixcrbfqjkb97r6kb"))
+             (patches
+              (search-patches "itstool-fix-segfault.patch"))))
     (build-system gnu-build-system)
     (inputs
      (list bash-minimal libxml2 python))
diff --git a/gnu/packages/patches/itstool-fix-segfault.patch 
b/gnu/packages/patches/itstool-fix-segfault.patch
new file mode 100644
index 00000000000..b07c4d2e032
--- /dev/null
+++ b/gnu/packages/patches/itstool-fix-segfault.patch
@@ -0,0 +1,11 @@
+--- a/itstool.in
++++ b/itstool.in
+@@ -1073,7 +1073,7 @@ class Document (object):
+         else:
+             ctxt.replaceEntities(1)
+         ctxt.parseDocument()
+-        trnode = ctxt.doc().getRootElement()
++        trnode = ctxt.doc().getRootElement().copyNode(1)
+         try:
+             self._check_errors()
+         except libxml2.parserError:

Reply via email to