Commit f4611ecb authored by Nick Wellnhofer's avatar Nick Wellnhofer

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
parent c68b3f3d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment