| 1 | From 1549b6d12eb2f35e5c7f1b1856c21768e92ba794 Mon Sep 17 00:00:00 2001
|
| 2 | From: Guido Trentalancia <[email protected]>
|
| 3 | Date: Wed, 1 Nov 2017 18:23:44 +0100
|
| 4 | Subject: [PATCH] Fix a segmentation fault bug introduced with version 2.0.4.
|
| 5 |
|
| 6 | https://github.com/itstool/itstool/issues/17
|
| 7 |
|
| 8 | This fix seems a lot easier than the previous reverted commit.
|
| 9 | ---
|
| 10 | itstool.in | 2 +-
|
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-)
|
| 12 |
|
| 13 | diff --git a/itstool.in b/itstool.in
|
| 14 | index c1d0585..e492e95 100755
|
| 15 | |
| 16 | |
| 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:
|