Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Florian Franzmann (87b806c95232f13bdb88b944b9a538694da031ac)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Florian Franzmann <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Florian Franzmann (87b806c95232f13bdb88b944b9a538694da031ac)
  • Date: Tue, 7 Aug 2018 19:24:15 +0000

GIT changes to master grimoire by Florian Franzmann
<siflfran AT hawo.stw.uni-erlangen.de>:

doc/itstool/0001-Be-more-careful-about-libxml2-memory-management.patch |
61 ++++++++++
doc/itstool/DETAILS |
1
doc/itstool/HISTORY |
5
doc/itstool/PRE_BUILD |
5
4 files changed, 72 insertions(+)

New commits:
commit 87b806c95232f13bdb88b944b9a538694da031ac
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

doc/itstool: fix possible segfault

diff --git
a/doc/itstool/0001-Be-more-careful-about-libxml2-memory-management.patch
b/doc/itstool/0001-Be-more-careful-about-libxml2-memory-management.patch
new file mode 100644
index 0000000..e271688
--- /dev/null
+++ b/doc/itstool/0001-Be-more-careful-about-libxml2-memory-management.patch
@@ -0,0 +1,61 @@
+From 9b84c007a73e8275ca45762f1bfa3ab7c3a852e2 Mon Sep 17 00:00:00 2001
+From: Shaun McCance <shaunm AT redhat.com>
+Date: Wed, 25 Oct 2017 12:10:03 -0400
+Subject: [PATCH] Be more careful about libxml2 memory management
+
+I think this fixes https://github.com/itstool/itstool/issues/17
+---
+ itstool.in | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/itstool.in b/itstool.in
+index c1d0585..a16eba9 100755
+--- a/itstool.in
++++ b/itstool.in
+@@ -477,6 +477,7 @@ class Document (object):
+ if load_dtd:
+ ctxt.loadSubset(1)
+ if keep_entities:
++ ctxt.loadSubset(1)
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
+ ctxt.replaceEntities(0)
+ else:
+@@ -1043,6 +1044,7 @@ class Document (object):
+ if self._load_dtd:
+ ctxt.loadSubset(1)
+ if self._keep_entities:
++ ctxt.loadSubset(1)
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
+ ctxt.replaceEntities(0)
+ else:
+@@ -1069,7 +1071,9 @@ class Document (object):
+ ph_node = msg.get_placeholder(child.name).node
+ if self.has_child_elements(ph_node):
+ self.merge_translations(translations, None,
ph_node, strict=strict)
+- child.replaceNode(ph_node)
++ newnode = ph_node.copyNode(1)
++ newnode.setTreeDoc(self._doc)
++ child.replaceNode(newnode)
+ else:
+ repl = self.get_translated(ph_node, translations,
strict=strict, lang=lang)
+ child.replaceNode(repl)
+@@ -1084,10 +1088,15 @@ class Document (object):
+ (lang + ' ') if lang is not None else '',
+ msgstr.encode('utf-8')))
+ self._xml_err = ''
++ ctxt.doc().freeDoc()
+ return node
+ retnode = node.copyNode(2)
++ retnode.setTreeDoc(self._doc)
+ for child in xml_child_iter(trnode):
+- retnode.addChild(child.copyNode(1))
++ newnode = child.copyNode(1)
++ newnode.setTreeDoc(self._doc)
++ retnode.addChild(newnode)
++
+ ctxt.doc().freeDoc()
+ return retnode
+
+--
+2.18.0
+
diff --git a/doc/itstool/DETAILS b/doc/itstool/DETAILS
index a4fecae..e57144d 100755
--- a/doc/itstool/DETAILS
+++ b/doc/itstool/DETAILS
@@ -1,5 +1,6 @@
SPELL=itstool
VERSION=2.0.4
+ PATCHLEVEL=1

SOURCE_HASH=sha512:f5cfa9c75710f9cc43a61caeb92ca04ec77023bce6fb14d770dda82efde2e5d9050245618c249d309227a3d43555cb1739f5fe680b4a370786ed4631fa9ee4b7
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
diff --git a/doc/itstool/HISTORY b/doc/itstool/HISTORY
index a37897c..d516c92 100644
--- a/doc/itstool/HISTORY
+++ b/doc/itstool/HISTORY
@@ -1,3 +1,8 @@
+2018-08-07 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * PRE_BUILD,
0001-Be-more-careful-about-libxml2-memory-management.patch:
+ fix possible segfault
+ * DETAILS: PATCHLEVEL++
+
2018-01-03 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 2.0.4

diff --git a/doc/itstool/PRE_BUILD b/doc/itstool/PRE_BUILD
new file mode 100755
index 0000000..e9bfc36
--- /dev/null
+++ b/doc/itstool/PRE_BUILD
@@ -0,0 +1,5 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p1 <
"$SPELL_DIRECTORY/0001-Be-more-careful-about-libxml2-memory-management.patch"
+



  • [SM-Commit] GIT changes to master grimoire by Florian Franzmann (87b806c95232f13bdb88b944b9a538694da031ac), Florian Franzmann, 08/07/2018

Archive powered by MHonArc 2.6.24.

Top of Page