projects/aports·blob master · refs

25 lines · 835 B

1From 1549b6d12eb2f35e5c7f1b1856c21768e92ba794 Mon Sep 17 00:00:00 2001
2From: Guido Trentalancia <[email protected]>
3Date: Wed, 1 Nov 2017 18:23:44 +0100
4Subject: [PATCH] Fix a segmentation fault bug introduced with version 2.0.4.
5
6https://github.com/itstool/itstool/issues/17
7
8This fix seems a lot easier than the previous reverted commit.
9---
10 itstool.in | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/itstool.in b/itstool.in
14index c1d0585..e492e95 100755
15--- a/itstool.in
16+++ b/itstool.in
17@@ -1053,7 +1053,7 @@ class Document (object):
18 else:
19 ctxt.replaceEntities(1)
20 ctxt.parseDocument()
21- trnode = ctxt.doc().getRootElement()
22+ trnode = ctxt.doc().getRootElement().copyNode(1)
23 try:
24 self._check_errors()
25 except libxml2.parserError: