wok-next view itstool/stuff/patches/fix-segfault.patch @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents
children
line source
1 From 1549b6d12eb2f35e5c7f1b1856c21768e92ba794 Mon Sep 17 00:00:00 2001
2 From: Guido Trentalancia <guido@trentalancia.com>
3 Date: Wed, 1 Nov 2017 18:23:44 +0100
4 Subject: [PATCH] Fix a segmentation fault bug introduced with version 2.0.4.
6 https://github.com/itstool/itstool/issues/17
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(-)
13 diff --git a/itstool.in b/itstool.in
14 index c1d0585..e492e95 100755
15 --- a/itstool.in
16 +++ b/itstool.in
17 @@ -1048,7 +1048,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: