[libxslt] Fix possible NULL pointer deref in xsltCopyTextString
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Fix possible NULL pointer deref in xsltCopyTextString
- Date: Sun, 13 Dec 2015 19:34:28 +0000 (UTC)
commit f4611ecb4d212292c61feb8f1ba124f77a1c1e7c
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sun Dec 13 19:32:29 2015 +0100
Fix possible NULL pointer deref in xsltCopyTextString
Based on the patch by mahendra.n. First part of fix for bug #757665.
https://bugzilla.gnome.org/show_bug.cgi?id=757665
libxslt/transform.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libxslt/transform.c b/libxslt/transform.c
index 24f9eb2..1c98254 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -929,9 +929,9 @@ xsltCopyTextString(xsltTransformContextPtr ctxt, xmlNodePtr target,
}
copy = xmlNewTextLen(string, len);
}
+ if (copy != NULL && target != NULL)
+ copy = xsltAddChild(target, copy);
if (copy != NULL) {
- if (target != NULL)
- copy = xsltAddChild(target, copy);
ctxt->lasttext = copy->content;
ctxt->lasttsize = len;
ctxt->lasttuse = len;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]