Blame SOURCES/libxml2-Do-not-print-error-context-when-there-is-none.patch

6dedca
From c5031779667ff362d670e34a42e9bc4f5a430793 Mon Sep 17 00:00:00 2001
6dedca
From: Daniel Veillard <veillard@redhat.com>
6dedca
Date: Fri, 20 Nov 2015 15:01:22 +0800
6dedca
Subject: [PATCH] Do not print error context when there is none
6dedca
To: libvir-list@redhat.com
6dedca
6dedca
Which now happens more frequently du to xmlHaltParser use
6dedca
6dedca
Signed-off-by: Daniel Veillard <veillard@redhat.com>
6dedca
---
6dedca
 error.c | 4 +++-
6dedca
 1 file changed, 3 insertions(+), 1 deletion(-)
6dedca
6dedca
diff --git a/error.c b/error.c
6dedca
index cbcf5c9..9c45040 100644
6dedca
--- a/error.c
6dedca
+++ b/error.c
6dedca
@@ -177,7 +177,9 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
6dedca
     xmlChar  content[81]; /* space for 80 chars + line terminator */
6dedca
     xmlChar *ctnt;
6dedca
 
6dedca
-    if (input == NULL) return;
6dedca
+    if ((input == NULL) || (input->cur == NULL) ||
6dedca
+        (*input->cur == 0)) return;
6dedca
+
6dedca
     cur = input->cur;
6dedca
     base = input->base;
6dedca
     /* skip backwards over any end-of-lines */
6dedca
-- 
6dedca
2.5.0
6dedca