- Add itstool-fix-crash.patch: Fixed crash in locale filter and drop rule (bgo#71511). - Update to version 2.0.1: + Reworked default ITS rules for better performance. + Fixed handling of namespace prefixes on elements. OBS-URL: https://build.opensuse.org/request/show/208252 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/itstool?expand=0&rev=18
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
From 46067ed60cbe1e5e3efe176da1f40f8219336490 Mon Sep 17 00:00:00 2001
|
|
From: Shaun McCance <shaunm@gnome.org>
|
|
Date: Sun, 24 Nov 2013 14:10:03 -0500
|
|
Subject: [PATCH] Fixed crash in locale filter and drop rule, #715116
|
|
|
|
When the dropped node has no preceding sibling, itstool crashes
|
|
because it tries to unlink prev node if it's blank.
|
|
---
|
|
itstool.in | 4 ++--
|
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/itstool.in b/itstool.in
|
|
index 150b395..a04ab2b 100755
|
|
--- a/itstool.in
|
|
+++ b/itstool.in
|
|
@@ -859,7 +859,7 @@ class Document (object):
|
|
prev = node.prev
|
|
node.unlinkNode()
|
|
node.freeNode()
|
|
- if prev.isBlankNode():
|
|
+ if prev is not None and prev.isBlankNode():
|
|
prev.unlinkNode()
|
|
prev.freeNode()
|
|
return
|
|
@@ -914,7 +914,7 @@ class Document (object):
|
|
prev = node.prev
|
|
node.unlinkNode()
|
|
node.freeNode()
|
|
- if prev.isBlankNode():
|
|
+ if prev is not None and prev.isBlankNode():
|
|
prev.unlinkNode()
|
|
prev.freeNode()
|
|
return
|
|
--
|
|
1.7.1
|
|
|
|
|