aports/main/itstool/fix-segfault.patch
Keith Maxwell 109acf488d main/itstool: upgrade to 2.0.6
Modernise and enable full test suite

Changelog:
https://github.com/itstool/itstool/blob/master/NEWS#L1
2020-05-15 02:00:29 +00:00

25 lines
835 B
Diff

From 1549b6d12eb2f35e5c7f1b1856c21768e92ba794 Mon Sep 17 00:00:00 2001
From: Guido Trentalancia <guido@trentalancia.com>
Date: Wed, 1 Nov 2017 18:23:44 +0100
Subject: [PATCH] Fix a segmentation fault bug introduced with version 2.0.4.
https://github.com/itstool/itstool/issues/17
This fix seems a lot easier than the previous reverted commit.
---
itstool.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/itstool.in b/itstool.in
index c1d0585..e492e95 100755
--- a/itstool.in
+++ b/itstool.in
@@ -1053,7 +1053,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: